Hi Peter,
I know it is code in the first template that is running because I did insert
a message box to display in the code in that template that was not present
in the code of the new template. That message box displays _after_
(1) the code switches the attached template and
(2) displays and executes code in a form from the original template.
That is, the code in template 1:
Switches the attached template to be template 2,
Creates an instance of the form from template 1 and displays it (with no
explicit reference back to template 1)
Follows the code in the cmdOK_click event or the cancel event from that
form, and
Displays a message box (not found in template 2's code).
I suspect that the code finishes loading before the template switch takes
place.
BTW - the same thing happens in Word 97.
No, I don't think it should work this way, either. But it does. So, for now,
I use it.
There is no other instance of template 1 open or loaded when this happens.
--
Charles Kenyon
Word New User FAQ & Web Directory:
<URL:
http://addbalance.com/word/index.htm>
Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide)
<URL:
http://addbalance.com/usersguide/index.htm>
See also the MVP FAQ: <URL:
http://www.mvps.org/word/> which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.