This documentation is archived and is not being maintained.

Pause Method

Visual Studio .NET 2003

Pauses the macro recorder so that no code is written to the macro currently being recorded. (Should not be used from within a macro.)

[Visual Basic .NET]
Public Sub Pause() 
[Visual Basic 6]
Sub Pause() 
HRESULT __stdcall Pause();
void Pause();
[JScript .NET]
public function Pause()


Pause can be useful when one macro command invokes another to perform its task, but the first command does not require or want the second command to be recorded in the macro. In this case, the first command emits code that captures the entire command's behavior.

To resume macro recording after pausing, use the Resume Method. Pause should be used only from within add-ins and not within macros.

If you invoke Pause in an Add-in while not in macro recording mode, the method does nothing, but no error occurs.

See Also

Automating Repetitive Actions by Using Macros | EmitMacroCode Method | IsRecording Property | Resume Method

Applies To: Macros Object