G
Greg Mc
Many users (approx 1500+) in my company use a macro that
is stored in their Normal.Dot to fax standard letters to
customers using our desktop faxing program. The macro was
written by someone who has since left the company and was
initially distributed over 4 years ago and has worked
without a hitch.
It was written for Word '97 and the vast majority of users
still use this version.
These standard letters are automatically created using a
basic company fax header from 2 other applications without
any complications. In this standard template are bookmarks
so that data can be placed in the correct location.
When the faxes are created from application 2, there are
instances where the user will amend some of the text where
the bookmarks are (eg the fax no, to name etc). If they
then execute the macro the error "1005 - This Bookmark
Does not Exist" occurs. here is the code sample:
WordBasic.WW7_EditGoTo "ToFacsimile"
WordBasic.EndOfLine 1
WordBasic.Charleft 1, 1
fa = WordBasic.[Selection$]() 'Fax Number
If I go to Insert Bookmarks, the bookmarks appear in the
List or if I run this code from Knowledge Base article
163810 each bookmark is displayed
Sub GetBookMarksByName()
Dim bmBookMark As Bookmark
For Each bmBookMark In ActiveDocument.Bookmarks
MsgBox bmBookMark.Name
Next
End Sub
Why does this error occur even though the bookmark is
there and is there a way to get around this.
is stored in their Normal.Dot to fax standard letters to
customers using our desktop faxing program. The macro was
written by someone who has since left the company and was
initially distributed over 4 years ago and has worked
without a hitch.
It was written for Word '97 and the vast majority of users
still use this version.
These standard letters are automatically created using a
basic company fax header from 2 other applications without
any complications. In this standard template are bookmarks
so that data can be placed in the correct location.
When the faxes are created from application 2, there are
instances where the user will amend some of the text where
the bookmarks are (eg the fax no, to name etc). If they
then execute the macro the error "1005 - This Bookmark
Does not Exist" occurs. here is the code sample:
WordBasic.WW7_EditGoTo "ToFacsimile"
WordBasic.EndOfLine 1
WordBasic.Charleft 1, 1
fa = WordBasic.[Selection$]() 'Fax Number
If I go to Insert Bookmarks, the bookmarks appear in the
List or if I run this code from Knowledge Base article
163810 each bookmark is displayed
Sub GetBookMarksByName()
Dim bmBookMark As Bookmark
For Each bmBookMark In ActiveDocument.Bookmarks
MsgBox bmBookMark.Name
Next
End Sub
Why does this error occur even though the bookmark is
there and is there a way to get around this.