This documentation is archived and is not being maintained.

EmitMacroCode Method

Visual Studio .NET 2003

Writes the line of code to the macro being recorded. (Should not be used from within a macro.)

[Visual Basic .NET]
Public Sub EmitMacroCode( _
   Code As String _
) 
[Visual Basic 6]
Sub EmitMacroCode( _
   Code As String _
) 
[C++]
HRESULT __stdcall EmitMacroCode(
   BSTR Code
);
[C#]
void EmitMacroCode(
   string Code
);
[JScript .NET]
public function EmitMacroCode(
   Code : String
)

Parameters

Code
Required. The line of code to add to the macro.

Remarks

You can use EmitMacroCode to build macros or to add code to existing macros.

This method fails if the environment is not in macro record mode. EmitMacroCode should be used only from within add-ins and not within macros.

See Also

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

Applies To: Macros Object

Show: