Search : in
By :

Open pdf file using command buttong in excel

Last answer on May 20, 2009 12:54:30 pm BST smd, on May 20, 2009 9:01:19 am BST 
 Report this message to moderators

Hello,
i have a form in excel which retrieves details of a user from one of the worksheet. against tht user row, there is a pdf file name which basically is a pdf file sitting on a location on the network. i need to open the pdf file using a command button. below is the code used..but m getting an error "there is an error opening this document file cannot be found"



Path = ActiveSheet.Cells(9, 2) 'this is the main path where all pdf files will b stored which is on a network
'if the path is Z:\SMD Filing System\SMD\
fname = "scan0001.pdf"


retval = Shell("C:\Program Files\Adobe\Reader 8.0\Reader\AcroRd32.exe path&fname", 1)

Configuration: Windows XP
Firefox 3.0.10

Best answers for « open pdf file using command buttong in excel » in :
Converting your PDF file into an Image Show Converting your PDF file into an Image Universal Document Converter PDF2IMAGE PDF TO IMAGE CONVERTER You could have encountered difficulties to modify PDF docs in the past. Nowadays this is no more trouble as there are several PDF...
Publish a PDF file on your website ShowPublish a PDF file on your Website Displaying a link to a PDF on your Website Displaying the PDF on your website Displaying a link to a PDF on your Website Proposing a PDF link on your own website is an operation that can seem...
Assembling multiple PDF files ShowAssembling multiple PDF files Intro Steps: Intro PDF creator is a software allowing you to print several files into one with its printer function. Download link http://en.kioskea.net/telecharger/telecharger-40-pdf...
Create a PDF file ShowCreate a PDF file What is a PDF file? PDF Creator Create Adobe PDF Online Primo PDF ITekSoft What is a PDF file? A Portable Document File (PDF) is a program that has been licensed by Acrobat Company. The program allows the user to...
Download PDF SaM (Split and Merge) ShowPDFsam is a tool to merge and cut PDF files. It is an open source application to treat PDF files. It requires Virtual Java machine 1.4.2 or superior version. With a simple and intuitive interface, you can: - split documents PDF into chapters, into...

1

Excelguru, on May 20, 2009 12:36:19 pm BST

Hi

Try this (not checked)

retval = Shell("C:\Program Files\Adobe\Reader 8.0\Reader\AcroRd32.exe " & path & fname, 1)

Do let me know If it helps... Winners are losers who got up and gave it one more try. -Dennis DeYoung
My Interests are financial Modelling and custom excel development.

Reply to Excelguru

2

 smd, on May 20, 2009 12:54:30 pm BST
  • +1

Remember seeing ur post on another site..and tried that but doesnt work.

i now got it working as below

ActiveWorkbook.FollowHyperlink fpath & attach_name, NewWindow:=True

Reply to smd