![]() |
Loading PDFs, Shell Function
Hi guys
- I am attempting to load a pdf using the following code: iStatus = Shell(sDirAndFilePath, vbMaximizedFocus) - I'm using an API call that successfully returns the Acrobat installation directory on different computers. - On one computer, sDirAndFilePath="C:\Program Files\Adobe\Acrobat 5.0\ Acrobat\Acrobat.exe C:\test.pdf" and this works fine. - On another computer, sDirAndFilePath="C:\Program Files\Adobe\Acrobat 4.0\ Acrobat\Acrobat.exe C:\test.pdf" but this returns an error in Acrobat "File not found", even though no error is detected in VB. - On the surace, it appears to be a version issue with Acrobat 4.0, but I don't know how feasible this is. Does a PDF loaded with v4 require different syntax to later versions of Acrobat? Any suggestions are appreciated. Thanks in advance. Paul Martin Melbourne, Australia |
Loading PDFs, Shell Function
Thanks Dave but your suggestion returns error 54: can't find file.
It appears to be neither an OS nor Acrobat version issue. I have two computers, both Win98, both with Acrobat v4. One works, one doesn't. I think maybe I need to reinstal Acrobat on the one that doesn't work. If anyone has any other illuminations, that'd be great. Regards Paul Martin Melbourne, Australia *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Loading PDFs, Shell Function
Is the c:\test.pdf missing or the adobe executable?
When you run the same command from a DOS prompt, what do you get? start C:\test.pdf Paul Martin wrote: Thanks Dave but your suggestion returns error 54: can't find file. It appears to be neither an OS nor Acrobat version issue. I have two computers, both Win98, both with Acrobat v4. One works, one doesn't. I think maybe I need to reinstal Acrobat on the one that doesn't work. If anyone has any other illuminations, that'd be great. Regards Paul Martin Melbourne, Australia *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! -- Dave Peterson |
Loading PDFs, Shell Function
Dave
Your suggestion loads a new dos box with a box title of the filename. I have since uninstalled Acrobat v4 and reinstalled it to no effect. I then installed Acrobat Reader v5 which fixed it. I then uninstalled Reader v5 and installed Acrobat v5 and it still worked. I then uninstalled Acrobat v5 and installed Acrobat v4 and the problem returned (even though I have it working on other machines with Acrobat v4). Regards Paul Martin Melbourne, Australia *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Loading PDFs, Shell Function
It _kind of_ sounds like a file association (well, from a distance).
When it's broken, in windows explorer: try shiftright clicking on the .pdf file and select OpenWith. Browse to the version of acrobat (AcroRd32.exe???) and check to always use that program for that file type. It might fix something...(or might not have any affect). Paul Martin wrote: Dave Your suggestion loads a new dos box with a box title of the filename. I have since uninstalled Acrobat v4 and reinstalled it to no effect. I then installed Acrobat Reader v5 which fixed it. I then uninstalled Reader v5 and installed Acrobat v5 and it still worked. I then uninstalled Acrobat v5 and installed Acrobat v4 and the problem returned (even though I have it working on other machines with Acrobat v4). Regards Paul Martin Melbourne, Australia *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! -- Dave Peterson |
All times are GMT +1. The time now is 09:47 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com