Jump to content

WordConstants UDF


realshyfox
 Share

Recommended Posts

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 by realshyfox

Learn, learn and ... learn

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...