M
mstuehler
All,
I'm working on a vbscript (that will run using windows script host), to
automate the modification of an existing Powerpoint presentation
The presentation contains a macro (named "someMacro") - I'd like to be able
to run that macro from vbscript. I've tried this:
Dim oApp
Set oApp = CreateObject("Powerpoint.Application")
oApp.Visible = True
Dim oPres
Set oPres = oApp.Presentations.Open("pres.ppt")
oApp.Run "someMacro"
The macro definitely exists, but when I run this script, I get this error:
Application.Run : Invalid request. Sub or function not defined
Code: 80048240
Any advice or suggestions would be greatly appreciated!
Cheers,
Matt Stuehler
I'm working on a vbscript (that will run using windows script host), to
automate the modification of an existing Powerpoint presentation
The presentation contains a macro (named "someMacro") - I'd like to be able
to run that macro from vbscript. I've tried this:
Dim oApp
Set oApp = CreateObject("Powerpoint.Application")
oApp.Visible = True
Dim oPres
Set oPres = oApp.Presentations.Open("pres.ppt")
oApp.Run "someMacro"
The macro definitely exists, but when I run this script, I get this error:
Application.Run : Invalid request. Sub or function not defined
Code: 80048240
Any advice or suggestions would be greatly appreciated!
Cheers,
Matt Stuehler