Well, here is the code I usually use for default programs...
I hope this helps!Code:' Usually in a module... Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long Public Const SW_SHOWNORMAL = 1 ' A URL to invoke browser lResult = ShellExecute(0&, vbNullString, "http://www.vb-world.net/", vbNullString, "C:\", SW_SHOWNORMAL) ' A URL to invoke mail client lResult = ShellExecute(0&, vbNullString, "mailto:[email protected]", vbNullString, "C:\", SW_SHOWNORMAL) ' Open Notepad, EditPad, etc. lResult = ShellExecute(0&, vbNullString, "c:\windows\setup.txt", vbNullString, "C:\", SW_SHOWNORMAL)




Reply With Quote