Method Invocation Failed Error When Calling SaveAs() In PowerShell Script
Whilst recently running Microsoft Office 2007 and attempting to convert a Word doc to a PDF via a PowerShell script, I was getting the following error returned:
Method invocation failed because [System.__ComObject] doesn't contain a method named 'SaveAS'
The solution in my case was to install a missing add-in for Microsoft Office 2007 available at the following URL:
This add-in is required in order to save files as PDF or XPS. Once installed my script then worked without these errors.