realshyfox 3 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 1 rjf7r reacted to this Learn, learn and ... learn Share this post Link to post Share on other sites