Boa tarde a todos. Por favor, uma macro pra tocar um som no Calc.

Em visualbasic uso:

Private Declare Function PlaySound Lib "winmm.dll" Alias _
    "PlaySoundA" (ByVal lpszName As String, ByVal HMODULE As _
        Long, ByVal DWFLAGS As Long) As Long
A = PlaySound("F:\Documents and Settings\R\Meus documentos\Minhas músicas\SAMSUNG\Trumpet1.wav", 0&, &H2000)

Esta macro funciona no Excel ? se sim qual versão do Excel ? e do arquivo, xls, etc ?

Tenta essa:

Sub InitSounds()
  If GetGuiType() = 1 Then
   oSounMgr = CreateUnoService("com.sun.star.media.Manager_DirectX")
  Else
   oSounMgr = CreateUnoService("com.sun.star.media.Manager_GStreamer")
  End If
  If NOT IsNull(oSounMgr) Then
    oSfa = CreateUnoService("com.sun.star.ucb.SimpleFileAccess")
    sBaseURL = CreateUnoService("com.sun.star.util.PathSubstitution")._
        substituteVariables("$(inst)/share/gallery/sounds", True) 'Insira aqui seu caminho para a pasta de audio
   
    sSound1 = sBaseURL & "/laser.wav" 'Insira aqui o nome do arquivo ".wav" a ser reproduzido.
    If oSfa.exists(sSound1) Then
    oPlayer1 = oSounMgr.createPlayer(sSound1)
    'oPlayer1.setRate(1.1)
    oPlayer1.setPlaybackLoop(False)
    oPlayer1.setMediaTime(0.0)
    oPlayer1.setVolumeDB(GetSoundVolume())
    End If
  End If
End Sub

Sub PlayJoin()
  If NOT IsNull(oPlayer1) Then
    oPlayer1.setMediaTime(0.0)
    oPlayer1.start()
  End If
End Sub