Launching PowerPoint from within Access

P

Paul Burdett

Hi Guys

I want to launch a PowerPoint presentation from an Access database.

I deploy the application with PDW and I can bundle the PwerPoint viewer with
it.

Do I use the Shell command to do this?

Thoughts welcome.

Kind regards

Paul Burdett
 
D

Douglas J Steele

That's one approach.

Another would be to use the FollowHyperlink method.

A third would be to use the ShellExecute API, illustrated in
http://www.mvps.org/access/api/api0018.htm at "The Access Web".

The advantage of the latter 2 approaches over Shell is that Shell requires
that you know where the executable exists, whereas the others don't.
 
P

Paul Burdett

Hi Guys

Well this is proving more difficult than I thought.

I do not mind using Shell and identifying the executable because I shall
have to distibute the PowerPoint viewer with the application because I can't
assume that PowerPoint is resident on the target machine.

But although it seems to work fine on the development PC, when I create an
MDE and use the PDW, the presentation does not launch.

Here is the code I am using. Am I missing something?

strExe = Left(CurrentDb.Name, Len(CurrentDb.Name) -
Len(Dir(CurrentDb.Name))) & "pptview.exe"
strPPS = Left(CurrentDb.Name, Len(CurrentDb.Name) -
Len(Dir(CurrentDb.Name))) & "KISSTour.pps"

strAssembled = strExe & " " & strPPS

Call Shell(strAssembled, 1)

Thoughts welcome

Kind regards Paul
 
D

Douglas J Steele

Assuming your file paths have spaces in them, you need to enclose them in
quotes:

strAssembled = Chr$(34) & strExe & Chr$(34) & " " & Chr$(34) & strPPS &
Chr$(34)
 
P

Paul Burdett

Hi Doug

Thanks again.

This now works on a PC which has Access 2004, but if I copy it over to a
machine with A2K, I get the message "Microsoft PowerPoint Viewer has
encountered a problem and needs to close..."

Do I need an Office 2000 PowerPoint Viewer, do you think?

Kind regards

Paul
 

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