Import module to activedocument

M

Mark

I am using WORD 97.

I have a global template in the startup folder, and I want some code to run
when any other document runs that imports a text file from the C:\test.txt
(which consists of a routine

Private Sub Document_Open()

...... do something

End Sub

into the ThisDocument of the ActiveDocument (not the global thisdocument)

Canit be done, and if so would someone be kind enough to tell me how?
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?TWFyaw==?=,

Best you could probably do would be to intercept an event like DocumentChange.
Keep a list (array) of opened documents and, when the event is fired, check
whether ActiveDocument is one of these. If not, a new document was created or
an existing opened.

Note, though, that Word97 supports only a very limited number of events. I'm
not sure whether DocumentChange is one of them.
I am using WORD 97.

I have a global template in the startup folder, and I want some code to run
when any other document runs that imports a text file from the C:\test.txt
(which consists of a routine

Private Sub Document_Open()

...... do something

End Sub

into the ThisDocument of the ActiveDocument (not the global thisdocument)

Canit be done, and if so would someone be kind enough to tell me how?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top