Hi,
I have created a macro which will insert some text to the bookmaks through
my User form that I created in a templete (.dot).
My problem is every time I run the templete, it will create new document and
If I might need to use anather word document and come back to my main user
form it gave me ERROR 5941.
HOW DO I TELL MY MACRO THAT IT SHOULD ONLY REFER THE DOCUMENT THAT CONTAIN
THE BOOKMARKS
THEJAN
Doug Robbins - Word MVP - 31 Oct 2003 08:57 GMT
Hi Thejan,
In the declarations section of the userform code, Dim a variable as a
document and then in the Initialize event for the UserForm, set that
variable to the ActiveDocument. Then refer to the bookmarks in the variable
in the balance of the code.
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.
Hope this helps
Doug Robbins - Word MVP
> Hi,
>
[quoted text clipped - 9 lines]
>
> THEJAN