vbscript calling vba macro w/ parameters

DJFuji

Diamond Member
Oct 18, 1999
3,643
1
76
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
 
 

DJFuji

Diamond Member
Oct 18, 1999
3,643
1
76
Ok i figured out the solution, for anyone interested.

This code does it:

pptApp.Run "PPT_Misc.ppt!Module2.GetSQLData", "4A", 3, "Slide7", 3