I have a VBScript that creates a big Word document. I need to have it insert a page break at the end so I can insert another select of text however I can't get the page break to work.
I've tried
objWord.Documents(tempFile).Activate
Set objSelection = objWord.Selection
objSelection.InsertBreak(7)
objWord.Documents(tempFile).Activate
Set objSelection = objWord.Selection
objSelection.InsertBreak(wdPageBreak)
objWord.Documents(tempFile).Activate
Set objSelection = objWord.Selection
objSelection.InsertBreak Type:=7
objWord.Documents(tempFile).Activate
Set objSelection = objWord.Selection
objSelection.InsertBreak Type:wdPageBreak
It just skips over it an inserts all the text without creating a page break.