Forum Discussion
M_sqd
Dec 16, 2022Copper Contributor
Convert compatibility legacy doc to docx
I'm looking for a PS script to convert a batch of legacy Word documents that are in compatibility mode. Unfortunately, the script I found online; https://nam06.safelinks.protection.outlook.com/?url=h...
EvanSullivan37
Apr 24, 2023Copper Contributor
I am trying to use the same code the OP is using and making your changes. However I get the error. For the record line 10 is just "$document.Close()"
Parameter value was out of acceptable range
At line:10 char:5
+ $document.SaveAs2([ref]$docx_filename, [ref]$Format, [ref][Micros ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (:) [], COMException
+ FullyQualifiedErrorId : System.Runtime.InteropServices.COMException
AndySvints
May 01, 2023Iron Contributor
- Paul1460Oct 11, 2024Copper Contributor
AndySvints, did you manage to get the document.SaveAs2 code working?