The Reflection Macro Recorder supports .NET. You can use the recorder to record scripts in C# and VB.NET, copy the text to a clipboard, and paste the code in a code editor.
Recording .NET Syntax
The Reflection script recorder allows you to select VB.NET and C# syntax for recorded scripts (in addition to support for VB and VBA syntax). Commands are recorded to the Windows clipboard. You can paste the resulting code directly to your code editor.
To record commands
- Click Macro > Start Recording.
- Perform the actions that you want to record.
- Click Macro > Stop Recording. This opens the Stop Recording dialog box.
- In the Stop Recording dialog box, select Clipboard from the Destination drop-down menu. The Clipboard options group box displays.
- In the Syntax drop-down menu, select the appropriate syntax, VB.NET Source or C# Source.
- Optional: If you choose, you can enter a value for Function (or use the default). Also, you can select the Include object prologue check box so that the recorded code includes Sub and End Sub statements for VB.NET, or, for C#, a function declaration.
- Click OK.
- Open your code editor and paste in the recorded code.