View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Jon Peltier[_4_] Jon Peltier[_4_] is offline
external usenet poster
 
Posts: 90
Default Possible to automate Powerpoint from within Excel of Visual Basic?

I missed the original post, but I have posted some Excel-PowerPoint
examples he

http://www.geocities.com/jonpeltier/Excel/XL_PPT.html

- Jon
-------
Jon Peltier, Microsoft Excel MVP
http://www.geocities.com/jonpeltier/Excel/index.html
_______

James wrote:

Hi Greg - it can be done.

In your Excel VBProject, you need to create a reference to the 'Microsoft PowerPoint 8.0 Object Library' or whatevery version you have available.

Your procedure would then look something like this:

Sub RunPowerpointMacro()

Dim oApp As PowerPoint.Application

'create an instance of Powerpoint and make it visible
Set oApp = New PowerPoint.Application
oApp.Visible = True

'open the presentation
oApp.Presentations.Open "C:\MyPresentation.ppt"

'run the macro
oApp.Run "MyPresentation.ppt!Module1.TestMacro"

End Sub