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 / January 2007

Tip: Looking for answers? Try searching our database.

My add-in .DOT's VBA events don't fire

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Avi - 21 Jan 2007 16:28 GMT
Hi all,

  Word  2003 vba: How can I activate the VBA events of a .DOT I attached as
an "add-in"; alternatives? wll file?

I have just completed writing part of a fairly complex VBA utility for
controlling Word. This utility makes use of a number of events including
Document_New and Document_Open.

First of all I just designed the forms, code and events in the doc's
*template*, coz it was just convenient.

Now, I needed to apply this utility to a different document, so I decided
that it was time to see if I could add it all as an "add-in" (using
Tools|Templates and Add-ins|Add). So I made a different DOT file containing
all my VBA stuff and saved it to disk, calling it *something.dot*. Then I
*added it* to my doc, as above. Then, to test if the Document_Open would be
invoked when I then re-open my doc, I closed the document and then re-opened
it. Lo and behold...

the Document_Open event was NOT invoked.

I also made sure that the .DOT add-in was also open before I opened my doc,
to see if that would help, and it did not help.

Why is life so difficult...?

Anyway...so I understand you can't get your doc to connect with events this
way? If not, so what's the simplest alternative way of achieving this?

And btw, I see from the Add-in dialog box, you can also add in WLL files.
What are these and how do you make them?

Tnx,

- avi
Doug Robbins - Word MVP - 22 Jan 2007 04:41 GMT
Where did you save the template that you want to be treated as an add-in.
It needs to be saved into the Word Startup folder the location of which is
shown under Tools>Options>File Locations.

Signature

Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

> Hi all,
>
[quoted text clipped - 38 lines]
>
> - avi
 
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.