
check for existence of bookmark, possible?
I'm trying to check for the existence of a bookmark in any given
document, controlling Word 2000 from
Visual Basic 6. Is this
possible?
Right now I use this code to insert text at a bookmark.
ActiveDocument.Bookmarks("Add1").Range.Text = " Text 1"
I'm thinking of using an array of bookmarks, e.g. BkMk(1 to 10),
then using:
for n = 1 to 10
ActiveDocument.Bookmarks(BkMk(n)).Range.Text = Text(n)
next n
but not every doc holds every bookmark. I could use this
statement:
On Error continue Next
but I'd rather avoid generating errors.
Any suggestions?