I'm assuming you want to open the pdf file via
]its application (cannot open it anyway into excel)
the following code will work using shellexercute
API
Option Explicit
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 Open_Pdf()
Dim PdfFile As String
Dim FDir As String
PdfFile = "ooslist.pdf" 'Pdf file name
FDir = "D:\HS" 'Directory where Pdf file exists
ShellExecute 0, "Open", PdfFile, "", FDir, 1
End Sub
HTH
Ivan
OK, code works, (need to declare private functions)BUT....
this works the same as linking to external file. Is there a way
to put the PDF in your spreadsheet and open from there.
Basically, I want to send one spreadsheet to where ever
and have them open PDF from their computer, not send PDF
and spreadsheet. If that was the case, then the coding
is worse than sending the PDF.