Unsuccessfully trying to launch PowerPoint Viewer

M

Mel

I have an Access 2003 application. I’m trying to open Power Point Viewer
2003 to display some PowerPoint slides, but can not get the Viewer executable
to launch from within my Access code.

I changed to the code in development mode to open Notepad and the Calculator
executables and both open just fine.

I did an install of Power Point Viewer on computer and I can run the
exectuable from within the Microsoft Office folder just fine. When I copy
the Power Point Viewer executable to the folder I need at another location on
C: drive and try to run it, the Viewer will not open. The Viewer executable
did not work on a test computer either.

Do I need to run some type of setup in the folder where the Viewer
executable will sit? Do I need have some other .dll files sitting in the
folder as well? I did not find anything in online documentation for other
files that might be needed to make it work.

I thought the entire point of having the Power Point Viewer was to display
slides without the requirement that the end user not have the full version of
Power Point.

Thanks in advance for your help.
 
M

Mel

This does not work:
i = Shell((strViewPath & "PPTVIEW.EXE " & strPath & PresName & ".PPT"), 1)

but this does:
i = Shell("C:\WINDOWS\notepad.EXE", 1)

I have pptview.exe sitting in a folder on my c: drive called 'fastaccts' and
the executuable does not work. pptview.exe also sits on the c: drive in the
office11 folder, and it works just fine there. That's why I'm wondering if I
need to run some type of setup program for pptview.exe

Thanks.
 
D

Douglas J. Steele

How have you set strViewPath? What's the value of strPath? If there are
embedded blanks in strPath, you need quotes around the file:

i = Shell((strViewPath & "PPTVIEW.EXE " & Chr$(34) & strPath & PresName &
".PPT" & Chr$(34)), 1)

or

i = Shell((strViewPath & "PPTVIEW.EXE """ & strPath & PresName & ".PPT""",
1)

If strViewPath has embedded blanks, you'll need quotes there as well:

i = Shell((Chr$(34) & strViewPath & "PPTVIEW.EXE" & Chr$(34) " & Chr$(34) &
strPath & PresName & ".PPT" & Chr$(34)), 1)

or

i = Shell(("""" & strViewPath & "PPTVIEW.EXE"" """ & strPath & PresName &
".PPT""", 1)


However, try this instead:

Application.FollowHyperlink strPath & PresName & ".PPT"
 
M

Mel

I got it to work!!! But it was not related to the code. I did not notice
that Power Point Viewer had its own folder outside of the Microsoft Office11
folder. I copied the other files that were in that folder (some .dlls and a
..htm file) into my app folder and the Power Point Viewer did launch like I
need it. I also retested my code and it did launch the Viewer as I need it
to do. I'll just have to include those other Power Point Viewer files with
my installation package.

The variables are set by the time this line of code gets executed, and there
were no extra spaces involved. I did inherit this code from another group of
programmers and would have been no surprise if they left in extra stuff like
that - thanks for the extra set of eyes. I thought the problem was with
Power Point Viewer, since other executables such as Notepad and Calculator
were launced successfully.

Thanks so much for your help!!! :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top