Reading and Editing Your Recorded VBA Code

The best way to get started with the Visual Basic Editor is to record a macro, and then to study the code you've recorded. For example, you can record a macro that adds a place for your signature to the end of any document. Follow these steps to record the macro:

  1. Open a document to use as a test document while you are recording the macro.

  2. Double-click the REC button on the status bar. The Record Macro dialog box appears.

  3. Type Signature as the macro name, and click OK.

  4. Press Ctrl+End to move to the end of the document.

  5. Press Enter twice to add a paragraph and a blank line.

  6. Type Sincerely, then press Enter four times.

  7. Type your name, and press Enter.

  8. Press Ctrl+I to turn on italic.

  9. Type your title, then press ...

Get Special Edition Using Microsoft® Word 2000 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.