View Full Version : Displaying a .PDF File


JACKSON
03-27-2007, 05:24 PM
I am having a proble displaying a .pdf file on a command button action.

Here is the part of my code that calls up the file:

Dim StrProg As String
Dim StrFile As String

StrProg = "C:\Program Files\Adobe\Acrobat 7.0\Reader.exe"
StrFile = "C:\Program Files\Polaris Medical Chart Ver3.3\example.pdf"

Shell StrProg & StrFile, vbNormalFocus

Exit Sub

I get a file not found error. Any thoughts??

Thanks

Firemansam
03-27-2007, 05:34 PM
G'day Jackson,

When I checked the filename for the exe file for Adobe 7.0 it shows as being acrord32.exe not sure whether this is your problem or not.... Just a thought.

Regards

JACKSON
03-27-2007, 06:43 PM
Thanks

That was defiantely a problem, but I am still geting the same error message about file not being found. I have re-checked my dir paths. Does my shell command look OK ??

boblarson
03-27-2007, 07:08 PM
Currently your:
Shell StrProg & StrFile, vbNormalFocus

Will yield:
StrProg = "C:\Program Files\Adobe\Acrobat 7.0\Reader.exeC:\Program Files\Polaris Medical Chart Ver3.3\example.pdf"

So I'm assuming you need to revise to add a space:

Shell StrProg & " " & StrFile, vbNormalFocus