Results 1 to 2 of 2
2004-09-01, 12:24 #1
- Join Date
- Nov 2002
- Thanked 0 Times in 0 Posts
Order of events being handled (Word 2000)
We have Word templates that contain VBA code events such as "Open" and also COM addins with the same event and we are wondering in what order these events are handled. It seems the events defined in the template are handled first and then any events in regular addins and COM addins are handled in different orders. One problem we are encountering is that the way an event is handled in a COM addin needs to take place before the event in a particular template event handler takes place and we are wondering if there is a way to control or majke the event in the template wait until the COM handler finishes?
2004-09-01, 18:09 #2
- Join Date
- Feb 2001
- Silicon Valley, USA
- Thanked 94 Times in 90 Posts
Re: Order of events being handled (Word 2000)
<P ID="edit" class=small>(Edited by jscher2000 on 01-Sep-04 12:09. Addressing second question.)</P>The advice of Microsoft for Word 97 on precedence among document, template, and add-in procedures is listed in <post#=383651>post 383651</post#>. Because your ability to use events in these containers is a bit more limited than your ability to use macros, the rules might be a bit different. However, that is the best online resource I was able to find when I searched earlier this summer. Perhaps some of the keywords in that article will help you find updated information.
Added: Regarding making a local procedure wait for a more global one, if they have the same name, and that would be contrary to precedence, I doubt that is possible. However, you might be able to make the local procedure look for the more global one and execute it first should it be found and be appropriate to the context.