Microsoft KB Archive/292107

= WD2002: OnUpdate Event Is Executed Only in Original Document =

Article ID: 292107

Article Last Modified on 7/27/2006

-

APPLIES TO


 * Microsoft Word 2002 Standard Edition

-



This article was previously published under Q292107



SYMPTOMS
An OnUpdate event is not executed as expected when you edit Word documents. This behavior can occur in the following conditions:
 * The macro contains a CommandBars object.
 * You synchronize the macro with an OnUpdate event.

The OnUpdate event is not executed when you edit Word documents other than the one you created the macro in.



CAUSE
This behavior can exist because Word builds new toolbars for every new window when Word is in single document interface mode (SDI).



WORKAROUND
To work around this behavior, place the original Word document in multiple document interface mode (MDI). To place Word in MDI use the following steps:
 * 1) Return to the original document that you produced the Visual Basic for Applications macro in.
 * 2) On the Tools menu, click Options.
 * 3) In the Options dialog box, click the View tab.
 * 4) On the View tab, under Show, make sure that Windows in Taskbar is not selected, and then click OK.

Notice that the OnUpdate event is now executed as expected when you edit other Word documents.

Additional query words: prb

Keywords: kbprb KB292107

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.