realshyfox Posted May 25, 2011 Share Posted May 25, 2011 (edited) Here I publish my WordConstants UDF. I hope it shall be usefull. An example that uses Word constants from my UDF: It inserts some blank pages. #include<Word.au3> #include<WordConstants.au3> $oWord = _WordCreate(@ScriptDir &"\Guide.doc", 0, 1) $oDoc = _WordDocGetCollection($oWord, 0) $oDoc.Repaginate $NumPages = _WordDocPropertyGet($oDoc, "pages") $i=$NumPages Do $i = $i - 1 $oWord.Selection.GoTo($wdGotoPage, $wdGotoNext, 1) $oWord.Selection.InsertBreak($wdPageBreak) Until $i = 1 $oWord.Selection.EndKey($wdStory, $wdMove) ;updated script insert a new page at the end of the document $oWord.Selection.InsertBreak($wdPageBreak) _WordDocSave ($oDoc) _WordQuit ($oWordApp) UDF File:WordConstants.au3 Edited September 23, 2011 by realshyfox rjf7r 1 Learn, learn and ... learn Link to comment Share on other sites More sharing options...
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