StopMacroRecording Method (Macro)
Stops the macro recorder in the current terminal session and saves the macro.
where
expression is a variable that represents a
Macro Object
Parameters
- saveLocation
- A MacroDestinationOption value. The location to which the macro is saved. MacroDestinationOption.Document saves the macro to the session document's VBA project. MacroDestinationOption.CommonProject saves the macro to the Common VBA project. MacroDestinationOption.Clipboard copies the macro script to the Windows Clipboard.
- macroName
- The name of the saved macro. This parameter is ignored if saveLocation is Clipboard.
Exception | Description |
ArgumentException |
Thrown if the macro name is null, empty, or contains invalid characters.
|