Hi there,
I have a piece of code that I use to open up files (in this case, a pdf file) on my hard drive, however it opens it up and displays the file as an image, rather than as a pdf file via the Adobe program - see code below:
I would like help on two matters here:![]()
Sub OpenFile() Sheets("Sheet1").Select Dim FName As String FName = "C:\" & Range("D14") & ".pdf" ActiveSheet.OLEObjects.Add(Filename:=FName, _ Link:=False, _ DisplayAsIcon:=False).Select End Sub
1. How can I open the file via Adobe (or similar) rather than as an image?
2. How do I get the program to search using a different directory (rather than C:\ drive), as I plan on sending out the completed Excel file to customers on a CD or thumb drive. Not know what my customer's directory name will be makes this piece of code redundant apart from on my machine where I know I keep the pdf files.
Hoping that someone can assist me with this enquiry.
Thanks
Mark
Bookmarks