I need to open a PDF file from my help menu. I tried the Shell function like this:
RetVal = Shell(App.path + "\filename.pdf", 1)
but it's giving me an "Invalid procedure call" error
Any sugestion...??
I have a form with a button that shows a .pdf report if it exists at the top of the form, in the declarations I have this code:
Private 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
This function is what I use to open my pdf files. It works just as well if the report is a text, word, rtf or even a jpg.
Public SubShowReport(ByVal ReportName as String)
ShellExecute hwnd, "open", ReportName, "", App.Path, _ SW_RESTORE
End Sub
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.