Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Is it possible to run PowerPoint VBA macros from Powershell?

$
0
0

I want to run a PowerPoint Macro from a PowerShell script. If i try to run an Excel Macro it works, but if i try to run a PowerPoint Macro it says to me: "type must not be byval".


Code:
$ppt = new-object -comobject powerpoint.application
$pres = $ppt.Presentations.Open($pptSourceFilePath)
$tst = @('test')
$pres.Application.Run("TestMain",$tst)


Viewing all articles
Browse latest Browse all 6937

Trending Articles