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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

opening power point with vb 1

Status
Not open for further replies.

VBVines

MIS
Jun 11, 1999
98
US
Does anyone know if the create object method of opening up office apps exposes any methods, objects or properties with power point. Can a script be written that would open up the PPT file and go directly to the slide show? aspvbwannab
 
Ensure that you have a reference set to the Microsoft Powerpoint Object and Microsoft Office Object Libraries

Here's an example code, you'll need to tweak on the settings to make it more applicable toward your needs. I didn't add any of the event handling code.

Dim appPPT As PowerPoint.Application
Dim presPPT As PowerPoint.Presentation

On Error Resume Next
Set appPPT = GetObject(, "Powerpoint.Application")
If Err.Number <> 0 Then
Err.Clear
Set appPPT = CreateObject(&quot;Powerpoint.Application&quot;)
End If

On Error GoTo ErrorHandler

Set presPPT = appPPT.Presentations.Open(&quot;c:\Test.ppt&quot;, msoTrue, msoFalse, msoFalse)

appPPT.Visible = True

With presPPT.SlideShowSettings
.StartingSlide = 1
.EndingSlide = 1
.RangeType = ppShowSlideRange
.AdvanceMode = ppSlideShowUseSlideTimings
.LoopUntilStopped = True
.Run
End With Neil Konitzer, President
Freisoft
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top