Got a simple vbscript that calls a vba macro within a powerpoint slide. Works great, but i want to use parameters instead of having 6 different versions of the macro with only minor changes. Every time i try to call with parameters, it gives me an error. I've tried using parens, single quotes, double quotes, etc.
Any help would be appreciated.
Here's what the code looks like:
'-----------------------
'runpptmacro.vbs:
'-----------------------
Set pptApp = CreateObject("PowerPoint.Application")
pptApp.Run "PPT_Misc.ppt!Module2.GetSQLData" <-- trying to put parameters here
'-----------------------
PPT_Misc.ppt, Macro
'-----------------------
Sub GetSQLData(category As String, expectednumrecords As Integer, slidename As String, shapeID As Integer)
...
end sub
Any help would be appreciated.
Here's what the code looks like:
'-----------------------
'runpptmacro.vbs:
'-----------------------
Set pptApp = CreateObject("PowerPoint.Application")
pptApp.Run "PPT_Misc.ppt!Module2.GetSQLData" <-- trying to put parameters here
'-----------------------
PPT_Misc.ppt, Macro
'-----------------------
Sub GetSQLData(category As String, expectednumrecords As Integer, slidename As String, shapeID As Integer)
...
end sub