Article ID: 121157
Article Last Modified on 5/6/2003
Option Explicit
Declare Function ShellExecute Lib "SHELL" (ByVal hwnd%, ByVal _
lpszOp$, ByVal lpszFile$, ByVal lpszParams$, ByVal lpszDir$, _
ByVal fsShowCmd%) As Integer
Declare Function GetDesktopWindow Lib "USER" () As Integer
Function StartDoc (DocName As String)
StartDoc = ShellExecute(GetDesktopWindow(), "Open", DocName, _
"", "C:\", 1)
End Function
Error Value Meaning
----------------------------------------------------------------
2 The file was not found.
3 The path was not found.
8 There was insufficient memory to start the
application.
10 The Windows version was incorrect.
11 The executable file was invalid. Either it was not
a Windows application or there was an error in the
.EXE image.
Keywords: kbhowto kbprogramming KB121157