Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / October 2003

Tip: Looking for answers? Try searching our database.

ERROR 5941

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Thejan Mendis - 31 Oct 2003 08:01 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.