HighlanderSword Posted September 10, 2020 Posted September 10, 2020 Hello, When running the below it works until it get to the _Word_DocSaveAs line. It returns error = 2 and the extended com error = 2147352567. I'm using Word version 1808 and the latest Prod release of autoit. I'm able to do the same steps manually so I know it not an file access issue. Any ideas what To look for ? #include <Word.au3> #include <MsgBoxConstants.au3> #include <Date.au3> ; Create application object Local $oWord = _Word_Create() ; Open a document read-only Local $sDocument = "C:\Word_Doc.docm" $oDoc = _Word_DocOpen($oWord, $sDocument, Default, Default, True) $Strdate =_NowDate () _Word_DocFindReplace($oDoc, "xx/xx/xxxx", $Strdate) _Word_DocSaveAs($oDoc, "C:\Word_Doc2.docm")
HighlanderSword Posted September 10, 2020 Author Posted September 10, 2020 ok, found the issue had to specify format type of 16 when doing the save
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now