WD: No "Pause" Command in WordBasicLast reviewed: February 2, 1998Article ID: Q74630 |
The information in this article applies to:
SUMMARYIn WordPerfect there is a macro command called PAUSE that suspends the macro for user input until the user presses ENTER, at which point the macro continues. There is no WordBasic command to pause a running macro in this manner. The "More Information" section of this article discusses a method you can use to simulate the functionality of the PAUSE command.
MORE INFORMATION
To simulate this behavior in Word, use one of the following methods. WARNING: ANY USE BY YOU OF THE CODE PROVIDED IN THIS ARTICLE IS AT YOUR OWN RISK. Microsoft provides this macro code "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.
Method 1: Use macros and an Assigned Key CommandCreate two macros; the first will end at the pause, the second will start after the pause. Reassign the ENTER key to run the second macro by adding the following line to the end of the first macro, where "xxxx" is the name of the second macro:
ToolsCustomizeKeyboard .KeyCode = 13, .Category = 2, \ .Name = "xxxx", .AddAdd the following line to the beginning of the second macro, where "xxxx" is the name of the second macro:
ToolsCustomizeKeyboard .KeyCode = 13, .Category = 2, \ .Name = "xxxx", .Remove Method 2: Use a Message BoxInsert a MsgBox command at the point where you want to pause to allow user intervention. This MsgBox should prompt the user to press a certain key combination (such as CTRL+Z) when ready to resume the macro. Place the commands for the remainder of the macro into another macro and assign it the key combination referenced in the MsgBox. When you press this key combination, this macro runs, creating a pause effect between the first and second macro. For information about how to do this in Word 97, please see the following article(s) in the Microsoft Knowledge Base:
ARTICLE-ID: Q159484 TITLE : Simulating a Macro Pause in Word 97 REFERENCES"Microsoft Word for Windows Technical Reference," page 77 "Microsoft Word for Windows and OS/2 Technical Reference," pages 224-225
|
Additional query words: pausing
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |