Hi,
As we are talking about selection. I am wanting to insert a page break but to also be able to delete it like I have been doing with text. (Set range to equal bookmark, insert and re-insert bookmark around the range)
My code at the moment is:
Code:
Dim rngSupplyBreak As Range
Set rngSupplyBreak = ActiveDocument.Bookmarks("bmSupplyBreak").Range
If Me.chkSupply.Value = True Then
rngSupplyBody.Text = vbNewLine & "Supply Body"
ActiveDocument.Bookmarks.Add "bmSupplyBody", rngSupplyBody
rngSupplyBreak.Select
Selection.Range.InsertBreak (wdPageBreak)
ActiveDocument.Bookmarks.Add "bmSupplyBreak", rngSupplyBreak
Else
'reset data to empty
rngSupplyBody.Text = " "
ActiveDocument.Bookmarks.Add "bmSupplyBody", rngSupplyBody
rngSupplyBreak.Text = " "
ActiveDocument.Bookmarks.Add "bmSupplyBreak", rngSupplyBreak
End If
If you can help on either of the problems that would be super!