Home Page (Macros) | Overview | How Do I Topics | FAQ | Reference
You can record a macro in two ways. If you want to develop a complex macro that you can refine by editing the VBScript macro file, regular macro recording provides the interface to do so. The Quick Macro options by-pass this interface, enabling you to quickly record your actions without having to name a macro, provide a description for it, or review the resulting macro file. This also saves you some keystrokes whenever you want to run the Quick macro, as it remains available from the menu ¯ even if you close and reopen Visual C++ ¯ until you record another Quick macro.
You can also write a VBScript macro by hand.
During macro recording, you can temporarily pause to do something else. For example, you can pause to prepare for the next action. While you pause, the recorder does not track your keystrokes. When you are ready, you can resume recording where you stopped.
Note The recorder cannot record mouse actions when selecting text or moving the insertion point. You must use the keyboard to record these actions. However, you can use the mouse to click commands and options. The recorder does not always convert keystrokes into commands. If you are recording a named macro (not a Quick macro), examine the macro carefully when you stop recording to ensure it is complete. If you find something missing, add the appropriate code.
Record a named macro that I can save and edit
To record a named macro that you can save and edit
-or-
To add the macro to an existing file, select the file name from the Macro File box. If the name is not there, first install the file, then select it in the Macro File box.
Note You cannot record a macro that already exists or record to a file that is read-only.
(To resume recording, click the Pause button again.)
When recording stops, the selected macro file opens with the insertion point in the Sub
block of the newly recorded macro.
If the recorder cannot match a VBScript command to the actual command you carry out, the recorder inserts an ExecuteCommand call to carry out the command. However, if the recorder substitutes ExecuteCommand for a command that causes a dialog box to display, when you run the macro, the dialog box will appear, but no user input will display.