title: Office VBA method parameters (powershell)
body: <p>I am creating a script to manipulate some PowerPoint presentation files.  One of the methods I need to use is the createvideo method.</p>
  
  <p><a href="https://docs.microsoft.com/en-us/office/vba/api/powerpoint.presentation.createvideo" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/office/vba/api/powerpoint.presentation.createvideo</a></p>
  
  <p>The above link show the parameters and their type, but I don't know what the ranges are</p>
  
  <p>e.g.</p>
  
  <p>Quality is INT, but is it 1-100?  I don't really want to find out through trial and error!</p>
  
  <p>Is there a really easy way to find out this information.</p>
  
  <p>Below is a snippet of the script I am running</p>
  
  <pre><code>$powerpoint = New-Object -comobject powerpoint.Application
  $powerpoint.visible = [Microsoft.Office.Core.MsoTriState]::msoTrue
  
  $powerpoint.Presentations.Open("C:\temp\file.ppt")
  $SavePath = "C:\temp\Presentation.mp4"
  $powerpoint.ActivePresentation.CreateVideo($savepath,$true,"",1540,30)
  </code></pre>
  
  <p>The 30 is the quality parameter.</p>
  
  <p>Thoughts welcome.</p>
  
  <p>Sam</p>