Help!!
I have a set of templates that all contain code activated when the user does a File New. In the ThisDocument area I have a Document_New that runs a form and fills in all the details – beautiful, until….
If I have a document on the screen that has been created based on a template, and then try and create another document, two things happen. First, a new document is created, but not made active. Second, the original document is then modified by the form and the changes saved.
What I believe should happen is that on File New, the new document is made active, and any procedures that modify the document (eg filling in data for a letter and naming and saving the letter) should be applied to that new document – not another document that happens to be on the screen at the same time!
Word 97 doesn’t appear to have this problem and I think it has something to do with the activedocument.
I also have a problem when a user tries to print using printing macros. The user obviously wants to print what he or she can currently see on the screen (what I would expect to be the active document). However Word 2K doesn’t always agree that that is the active document, and often prints another of the open documents.
In the past I put all the code into a master template that was stored in the startup directory. However, this master template became too big and unwieldy. It was easier to break it up into smaller chunks and code that was specific to a template was stored on that template, only shared code stored on the master template. I would like to keep it this way if possible.
Any ideas would be most welcome.