Add actions to a macro

  1. On the Navigation toolbar, select Layout Designer .
  2. In the Layout Designer pane, in the Projects section, select a macro.
  3. In any of the action sections, drag and drop an action onto an empty area of the design surface.

    The properties dialog box for the action is displayed.

  4. Specify the action properties:
  5. Click OK.

    The action is displayed.

  6. Do one of the following:
    To Do this
    Link the Start icon to an action
    1. Click the Start icon.

      The link button is displayed.

    2. Click and drag the arrow that appears to the action.

      The arrow snaps onto the action.

    Link an action to another action
    1. Click the Start icon.

      The edit ribbon is displayed.

    2. On the edit ribbon, select and drag the arrow that appears to the action.

      The arrow snaps onto the action.

    Click Refresh Layout to clean up the display of action icons and labels.
    If you create a loop, the actions involved in the loop will change color to yellow to warn you. An infinity symbol ∞ will also appear on the actions involved in the loop. Make changes to the macro to remove the loop.
  7. If you want to specify for an action to execute only when a specified condition is met, do the following:
    1. Click the link leading to the action that you want to make conditional, and then select Edit the link.

    2. In the Link Properties dialog box, for Condition, choose one of the following:
      • Action Succeeded — if the action completes successfully, execute the linked action.
      • Action Failed — if the action cannot complete, execute the linked action.
      • Custom Condition — if the action meets a specified condition, execute the linked action.
    3. If you want to display a label for the link, for Label, type the text that you want to appear.
  8. Click Save.
  9. If you want to test the macro, select Run.

    When you run a macro from the design surface, the label on the Run button changes to Cancel.

  10. If you want to stop a running macro, select Cancel.
    You can cancel a running macro only when the macro is open for editing in the Layout Designer.

Last modified: Friday May 12, 2023

Is this useful?