View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson[_3_] Dave Peterson[_3_] is offline
external usenet poster
 
Posts: 2,824
Default Loading PDFs, Shell Function

This might not work for you, but why not just start the .pdf file itself. Let
windows find the associated program:

Shell("start C:\test.pdf")

My expertise with API consists of copying and pasting. But did you look at
FindExecutable in your API books?


Paul Martin wrote:

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


--

Dave Peterson