
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 Sub test() ShellExecute 0&, "Open", "filename.pdf", "", "c:directory", 1 End Sub |
Sub openpdf() strPath = "F:Downloadpippo.pdf" ThisWorkbook.FollowHyperlink strPath End Sub |
