[Return to contents]
Last updated: 12 Jul 2002
(Contributed by "David Legge" <email@example.com>)
It is possible to 'tell MS-Windows' to load a document into its default application for any file type recognised by windows using the Shell command. Eg.
x = Shell("rundll32.exe url.dll,FileProtocolHandler d:\clipart\acs.pcx")
To make like simple you might like to imbed the command in a script like the following:
Sub Loadfile( Filename as string) dim intRtn as integer On Error Goto ErrTrap intrtn = Shell("rundll32.exe url.dll,FileProtocolHandler " & Filename) ExitSub ErrTrap: 'Non-specific handler Msgbox "Error " & Format$(Err, "#0") & " - message: " & Error$, 16,"System Error" Resume Next End Sub