The code you posted doesn't run on my pc.
Selection.Text = "New Page " + i
should be
Selection.Text = "New Page " & i
and
Selection.Collapse wdDirection:=wdCollapseEnd
should be
Selection.Collapse Direction:=wdCollapseEnd
and
Selection.InsertBreak Type:=wdPageBreak
won't run because the selection at that point is the shape that has been inserted.
SO the conclusion is that you've never run the code that has been posted.
Can you post the actual code you are using.
|