Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Start Power Point Slide Show from Visual Foxpro

Status
Not open for further replies.

DENNISDBASE

Programmer
Oct 20, 2014
3
US
I can start Power Point using Shellexecute but it won't automatically start the slide show. Is there code to make this happen ?
I tried changing the *.ppt extension to *.pps but it didn't help.

This is my code:
o = CREATEOBJECT("Shell.Application")
o_Open("C:\Users\LARRY\Documents\cha(1).ppt")
 
Add "/S" as a command line switch. If you don't understand what I mean, I can correct your code. IOW, show us the code you use.
 
Yes, there are a couple of ways you can do this.

First, instead of launching PowerPoint itself, you can use ShellExecute() to launch the PowerPoint Viewer. In that case, just pass the name of the presentation file (including its path).

Alternatively, launch PowerPoint, and specify [tt]/S[/tt], and the name of the file (including path).

So, to launch c:\Presentations\MyPresentation.ppt, you would pass [tt]/S "c:\Presentations\MyPresentation.ppt"[/tt]. You place that whole string in the 4th parameter to ShellExecute().

Note that you need the full path, even if the file is on VFP's search path.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top