Kannst ja mal dies hier probieren
Declare Function FindExecutable Lib "shell32.dll" Alias "FindExecutableA" (Byval lpFile As String, Byval lpDirectory As String, Byval sResult As String) As Long
Private Function FindExecutableByExtension( FullPath As String ) As Variant
Dim success&, pos&, sResult$, RetVal$, lpFile$, lpDirectory$, msg$
sResult = Space$ ( MAX_PATH )
lpFile$ = ExtractFileName ( FullPath )
lpDirectory$ = Left$ ( FullPath , Len( FullPath ) - Len( lpFile$ ) )
success = FindExecutable ( lpFile$ , lpDirectory$ , sResult )
Select Case success
Case ERROR_FILE_NO_ASSOCIATION: msg = "no association"
Case ERROR_FILE_NOT_FOUND: msg = "file not found"
Case ERROR_PATH_NOT_FOUND: msg = "path not found"
Case ERROR_BAD_FORMAT: msg = "bad format"
Case Is >= ERROR_FILE_SUCCESS:
pos = Instr ( sResult , Chr$ ( 0 ) )
If pos Then RetVal = Left$ ( sResult , pos - 1 )
End Select
FindExecutableByExtension = RetVal
End Function
Private Function ExtractFileName( FilePath As String ) As String
'// Extract the FileName from FullPath
'// Called by : Function FindExecutableByExtension
'// Calls : Function InstrBack
ExtractFileName = Rightbp$( FilePath , InstrBack ( FilePath , "\" ) )
End Function