Quote:
Originally Posted by gmayor
Use the following
Code:
On Error Resume Next
If CheckBox1.Value = True Then
Set RngSrc = DocSrc.Bookmarks("A").Range
Set RngTgt = DocTgt.Bookmarks("A").Range
RngTgt.FormattedText = RngSrc.FormattedText
RngTgt.Bookmarks.Add "A"
Else
Set RngTgt = DocTgt.Bookmarks("A").Range
RngTgt.Text = ""
RngTgt.Bookmarks.Add "A"
End If
|
Thanks for your response Greg, however this hasn't worked. It hasn't done anything I don't think. When I didn't select the checkbox corresponding to bookmark A, the bookmark remained in the activedocument.
I am hoping that if not selected then the bookmark will be deleted.
Basically I have a document with lots of bookmarks line after line on an empty page and if i don't check a lot of the bookmarks then there are a whole lot of spaces in the document from where the bookmarks are. I hope that makes sense.