I am having a devil of a time inserting page breaks with VBA. I am combing documents by inserting them into a single document. I want to insert a page break between documents. I have tried a variety of methods and none work. I typically end up with a single break at the end of the document.
-Pete
Games the old fashion way with Dice, Paper and Pencils!
Code:
Do While Not oDB.dbRecordSet.EOF
Set oRange = oDoc.Content.Bookmarks.Item("\endofdoc").Range
oRange.InsertFile App.Path + "\qwerty.html", "", False, False, False
'Page Break
Set oRange = oDoc.Content.Bookmarks.Item("\endofdoc").Range
Set oParagraph = oDoc.Paragraphs.Add(oRange)
oParagraph.Range.InsertBreak wdPageBreak '<-- DOES NOT WORK
oDB.dbRecordSet.MoveNext
Loop
-Pete
Games the old fashion way with Dice, Paper and Pencils!