chrisred / posh-scripts

11 stars 4 forks source link

error converting de word filte to HTM, RTF... #13

Open rubendamiens opened 3 years ago

rubendamiens commented 3 years ago

Exception setting "SaveAs": Cannot convert the "C:\Users\p4482690.DRUIF\AppData\Roaming\Microsoft\Signatures\shortSig.htm" value of type "psobject" to type "Object". Hi,

The variables are put into the word doc, I can save the word document but $SavePath = Join-Path -Path $OutlookSignaturePath -ChildPath "$TemplateName.htm" $Word.ActiveDocument.SaveAs([Ref]$SavePath, [Ref][Microsoft.Office.Interop.Word.WdSaveFormat]::wdFormatHTML)

generates this error