This example repaginates the active document if it's changed since the last time it was saved.
If ActiveDocument.Saved = False Then ActiveDocument.Repaginate
This example repaginates all open documents.
For Each doc In Documents
doc.Repaginate
Next doc