Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi All,
I am write a simple macro to open a PDF from VBA, but I want the name of the PDF and location of the PDF as a string value, such that one could assign the macro to a button in excel and use it when needed. So far I have: Sub pdfVBA() Dim pdfLoc, pdfName As String 'change this to location of directory pdfLoc = "M:\" pdfName = ActiveCell.Value Shell "C:\Program Files\Adobe\Acrobat 5.0\Acrobat\Acrobat.exe" & _ pdfLoc & pdfName, 1 End Sub But I am receiving an "File not found" error. I suspect I has something to do with using the string values, because when I replace pdfLoc and pdfName with the location and file the code works. Thanks for any help in advance Eugene |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Controling Acrobat PDFs | Excel Discussion (Misc queries) | |||
Relative Hyperlinks to PDFs (or other documents) | Excel Discussion (Misc queries) | |||
Relative Hyperlinks to PDFs (and other documents) | Links and Linking in Excel | |||
Printing one Adobe pdf instead of multiple pdfs | Excel Programming | |||
Loading PDFs, Shell Function | Excel Programming |