T
Toby
I have a large document template that contains many bookmarks which are used,
deleted etc. by various procedures. At the very end of the procedures I want
to delete all bookmarks (which is no problem) except for about 6 that I have
to leave in place.
I cannot figure out how to refer to a bookmark by name in an if statement to
restrict the delete loop. The following still deletes ALL bookmarks.
Dim bookmark as Variant
For Each bookmark in ActiveDocument.Bookmarks
If bookmark<>"TC"
ActiveDocument.Bookmarks(bookmark).Delete
End If
Next
Thanks
Toby
deleted etc. by various procedures. At the very end of the procedures I want
to delete all bookmarks (which is no problem) except for about 6 that I have
to leave in place.
I cannot figure out how to refer to a bookmark by name in an if statement to
restrict the delete loop. The following still deletes ALL bookmarks.
Dim bookmark as Variant
For Each bookmark in ActiveDocument.Bookmarks
If bookmark<>"TC"
ActiveDocument.Bookmarks(bookmark).Delete
End If
Next
Thanks
Toby