WD2000: Macro Called by Application.OnTime Command Fails to Run (209952)
The information in this article applies to:
This article was previously published under Q209952 SYMPTOMS
When you try to call a macro using the Application.OnTime command, the macro does not run as expected.
CAUSE
This behavior is by design. If the macro containing the OnTime command is stored within one of the following: - A document level module, instead of a global module such as may be found in the Word default template, Normal.Dot,
-or-
- An attached template
-or-
- An add-in
and the active document is a document other than the document containing the procedure that executes the OnTime command, the called macro will not run.
WORKAROUND
To work around this problem, do one of the following:
-
Place the macro containing the OnTime command in a
module in the Word default template, Normal.dot.
-or-
- Place the macro containing the OnTime command in a
module in a template common to both
documents.
-or-
- Incorporate the OnTime command and related commands within a Word add-in.
STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. MORE INFORMATIONFor more information about add-ins, in the Visual Basic Editor, click Microsoft Visual Basic Help on the Help menu, type add-ins in the Office Assistant or the Answer Wizard, and then click Search to view the topic.
REFERENCES
For more information about getting help with Visual Basic for Applications,
please see the following article in the Microsoft Knowledge Base:
226118 OFF2000: Programming Resources for Visual Basic for Applications
Modification Type: | Major | Last Reviewed: | 12/6/2000 |
---|
Keywords: | kbprb KB209952 |
---|
|