返回列表 上一主題 發帖

[發問] 怎樣使excel 說出wav

[發問] 怎樣使excel 說出wav

真害~excel用64位元這些都無效了
excel 32還可以用…

Option Explicit

'API Class to take care of playing the file
Public Declare Function sndPlaySound32 Lib "winmm.dll" _
Alias "sndPlaySoundA" (ByVal lpszSoundName As String, _
                        ByVal uFlags As Long) As Long
50 字節以內
不支持自定義 Discuz! 代碼

回復 6# c_c_lai
真的是救苦救難的菩薩,太感謝了~
我想都沒有還可以32和64都可用的,這一招。
太完美了
50 字節以內
不支持自定義 Discuz! 代碼

TOP

回復 3# 自我感覺良好
如果同時要在 32 / 64 位元下均能執行,請修改成:
#If VBA7 Then
    'API Class to take care of playing the file
    Public Declare PtrSafe Function sndPlaySound32 Lib "winmm.dll" _
    Alias "sndPlaySoundA" (ByVal lpszSoundName As String, _
                        ByVal uFlags As Long) As Long
#Else
    Public Declare Function sndPlaySound32 Lib "winmm.dll" _
    Alias "sndPlaySoundA" (ByVal lpszSoundName As String, _
                        ByVal uFlags As Long) As Long
#End If

TOP

回復 1# 自我感覺良好
'API Class to take care of playing the file
Public Declare Function sndPlaySound32 Lib "winmm.dll" _
Alias "sndPlaySoundA" (ByVal lpszSoundName As String, _
                        ByVal uFlags As Long) As Long
'  修改成如下便可以了 ( PtrSafe )
'  API Class to take care of playing the file
Public Declare PtrSafe Function sndPlaySound32 Lib "winmm.dll" _
Alias "sndPlaySoundA" (ByVal lpszSoundName As String, _
                        ByVal uFlags As Long) As Long

TOP

我想要我的excel要像它一樣…會講話
https://youtu.be/17Wvun4onuY
50 字節以內
不支持自定義 Discuz! 代碼

TOP

32的excel可以用.rar (601.2 KB) 附上檔案,拿到64位元就不能用了…
50 字節以內
不支持自定義 Discuz! 代碼

TOP

2012年曾經討論過,不過到了64位的excel全都失效了
http://forum.twbts.com/viewthrea ... ntable&tid=7013
50 字節以內
不支持自定義 Discuz! 代碼

TOP

        靜思自在 : 多做多得。少做多失。
返回列表 上一主題