Define Macro Blocks

Explanation

Use this activity to define macro blocks. These blocks will then be connected to the macros, as described in the Connect Macro Blocks activity. The following table shows a couple of examples for macros.

Example 1- WORD_INIT Example 2 - WORD_UPDATE
 'Setup some variables'
    Dim sMsg
    sMsg = "Congratulations on your first document macro!"
Public Sub View_Word()
            MsgBox sMsg
End Sub

Prerequisites

N/A

System Effects

These macro blocks are the codes for the macro.

Window

Macro Basic

Related Window Descriptions

Macro Basic
Macro Basic/Document Macro Blocks

Procedure

  1. Open the Macro Basic window and click the Document Macro Blocks tab.
  2. Click New to create a new row.
  3. Enter a descriptive name for the block in the Block Name field.
  4. Double-click in the row's Script field to open an editor. Enter your script.
  5. Click Save to save the macro block.