(Solved) – Office VBA method parameters (powershell)

  • by
(solved)-–-office-vba-method-parameters-(powershell)

I am creating a script to manipulate some PowerPoint presentation files. One of the methods I need to use is the createvideo method.

https://docs.microsoft.com/en-us/office/vba/api/powerpoint.presentation.createvideo

The above link show the parameters and their type, but I don’t know what the ranges are

e.g.

Quality is INT, but is it 1-100? I don’t really want to find out through trial and error!

Is there a really easy way to find out this information.

Below is a snippet of the script I am running

$powerpoint = New-Object -comobject powerpoint.Application
$powerpoint.visible = [Microsoft.Office.Core.MsoTriState]::msoTrue

$powerpoint.Presentations.Open("C:tempfile.ppt")
$SavePath = "C:tempPresentation.mp4"
$powerpoint.ActivePresentation.CreateVideo($savepath,$true,"",1540,30)

The 30 is the quality parameter.

Thoughts welcome.

Sam

Leave a Reply

Your email address will not be published. Required fields are marked *