littleiitin
11-30-2011, 02:11 PM
Hi All,
I need a vba code to open a pdf file.
I have a code which incliudes API Call.
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
Sub OpenPDFFile()
Dim strFilePath As String
strFilePath ="C:\Temp\MyPdf.pdf"
ShellExecute 0, "Open", strFilePath, "", "", vbNormalNoFocus
End Sub
Is there any other method to open pdf file using VBA?
Thanks
Rahul Singh
I need a vba code to open a pdf file.
I have a code which incliudes API Call.
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
Sub OpenPDFFile()
Dim strFilePath As String
strFilePath ="C:\Temp\MyPdf.pdf"
ShellExecute 0, "Open", strFilePath, "", "", vbNormalNoFocus
End Sub
Is there any other method to open pdf file using VBA?
Thanks
Rahul Singh