Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long
Sub 播放讀音(file1 As String) ''http://forum.twbts.com/viewthread.php?tid=3563
'在程式區家上呼叫音樂檔
' file1 = "D:\pocketPC\Audio-1.wav" '填要播放的音樂檔
' file1 = "C:\Users\ssz3\Documents\ai3.wav" '填要播放的音樂檔
'mciSendString "seek " & file1 & " to start", vbNullString, 0, 0'用此式會當掉
mciSendString "close " & file1, vbNullString, 0, 0 'http://www.cc.chu.edu.tw/~u8802154/Multimedia/Page2.htm
mciSendString "open " & file1, vbNullString, 0, 0 '在使用 MCI 指令之前,切記須先將 MCI 關閉,下次再執行播放時才能 _
正確播放 , 或者是將播放的位置改變到最前面……:
mciSendString "play " & file1, vbNullString, 0, 0
'http://edisonx.pixnet.net/blog/post/60684029-%5B%E9%9F%B3%E6%95%88%5D-%E4%BD%BF%E7%94%A8%E6%8F%9A%E8%81%B2%E5%99%A8-(beep)
'http://www.blueshop.com.tw/board/FUM20050124191756KKC/BRD20071223011829C2R.html
'https://tw.answers.yahoo.com/question/index?qid=20110826000010KK06174
'https://tw.answers.yahoo.com/question/index?qid=20080427000010KK06462
'https://tw.answers.yahoo.com/question/index?qid=20131211000015KK00610
'https://www.google.com.tw/webhp?sourceid=chrome-instant&rlz=1C1JRYI_enTW714TW714&ion=1&espv=2&ie=UTF-8#q=vba%20beep%20%E9%9F%B3%E6%95%88
End Sub