S
smonczka
I am atempting to exacute a PPT macro from inside excel. Does anyone
have a sugestion on how to do this. I am running office 2003 on an XP
machine. All files I am working with are in the same directory.
I have found the following code that is suposed to work but dosn't...
The first one errors out because it can not seem to open the PPT file.
Sub PPTTest()
Dim PPT as Object
Set PPT = CreateObject("PowerPoint.Application")
PPT.Presentations.Open "C:\My Documents\PPTAutomation.ppt", ,
,False
PPT.Run "PPTAutomation.ppt!Module1.AutomationTest"
End Sub
The second example is used by creating an add-in in PPT and then
calling the add in from Excel but is unable to reference the object.
Sub mymacro()
Dim PPApp As PowerPoint.Application
Dim PPPres As PowerPoint.Presentation
Set PPApp = CreateObject("Powerpoint.Application")
PPApp.AddIns.Application.Run ("GetReturnValue")
End Sub
I'm open to any sugestions you might have. Thanks
Steve
have a sugestion on how to do this. I am running office 2003 on an XP
machine. All files I am working with are in the same directory.
I have found the following code that is suposed to work but dosn't...
The first one errors out because it can not seem to open the PPT file.
Sub PPTTest()
Dim PPT as Object
Set PPT = CreateObject("PowerPoint.Application")
PPT.Presentations.Open "C:\My Documents\PPTAutomation.ppt", ,
,False
PPT.Run "PPTAutomation.ppt!Module1.AutomationTest"
End Sub
The second example is used by creating an add-in in PPT and then
calling the add in from Excel but is unable to reference the object.
Sub mymacro()
Dim PPApp As PowerPoint.Application
Dim PPPres As PowerPoint.Presentation
Set PPApp = CreateObject("Powerpoint.Application")
PPApp.AddIns.Application.Run ("GetReturnValue")
End Sub
I'm open to any sugestions you might have. Thanks
Steve