Play any audio file using VBA Excel

前端 未结 5 1634
独厮守ぢ
独厮守ぢ 2021-01-26 20:52

I have a piece of code which can read most audio files (including wav, mp3, midi...), but it won\'t work if there are spaces in the path or File name.

so I have to revert

5条回答
  •  Happy的楠姐
    2021-01-26 21:32

    The function converts long full filename to 8.3 short format.

    Function get8_3FullFileName(ByVal sFullFileName As String) As String
        Dim FSO As Object: Set FSO = CreateObject("Scripting.FileSystemObject")
        get8_3FullFileName = FSO.GetFile(sFullFileName).ShortPath
    End Function
    

    Try it.

提交回复
热议问题