How can we help you?

You can create a macro in one of the following ways:

Record a sequence of actions that a macro should consist of.

Enter the macro code manually.

Convert the VBA macro code into a new macro with similar code in Lua.

To record a macro, do the following:

1.Start recording in one of the following ways:

On the Macros tab, click t_macros_rec_icon Record macro (beta).

When working in macOS, select the Tools > Macros > Record macro (beta) command from the command menu.

If the document contains at least one macro in the Lua language, on the Sidebar, click side_panel_macro Macros. In the Macros pane, click the side_panel_macro_expand button to the right of the New macro button. In the drop-down list, select Record macro (beta).

macros_rec_side_panel

2.Perform a sequence of actions that a macro should consist of.

In the current version of the application, not all user actions are available for recording. When you perform an action that cannot be recorded, the message “Action cannot be recorded” pops up on the screen.

3.Complete the recording in one of the following ways:

On the Macros tab, click t_macros_stop_rec_icon Stop recording macro.

When working in macOS, select the Tools > Macros > Stop recording macro command from the command menu.

If the document contains at least one macro in the Lua language, on the Sidebar, click side_panel_macro Macros. In the Macros pane, click the side_panel_macro_expand button to the right of the New macro button. In the drop-down list, select Stop recording macro.

macros_rec_stop_side_panel

On the Status bar, click t_macros_stop_rec_icon Stop recording.

macros_rec_stop_status_panel

4.In the opened dialog box, specify the macro name and click OK.

If the macros has been successfully saved, the following pop-up message will be displayed on the screen: “"Macro_name" macro saved”.

To enter the code of a macro manually:

1.Create a new macro using one of the following methods:

On the Macros tab, click t_macros_editor_icon Macro editor. When working in macOS, you can also run the Tools > Macros > Macro editor command from the command menu. In the Macro editor window, click macros_add_script_icon.

macros_editor_create

If the document contains at least one macro in the Lua language, on the Sidebar, click side_panel_macro Macros. In the Macros pane, click New macro.

macros_create_side_panel

2.Enter a name for the macro or leave the default name. To save the name, press Enter or click anywhere in the Macro editor.

macros_editor_create_name

3.Enter the code of the macro.

The new macro will be saved automatically.

When you add the first macro in Lua to the document, the side_panel_macro Macros button appears on the Sidebar. This button is displayed as long as there is at least one macro written in Lua in the document.

Click side_panel_macro Macros to open the Macros pane.

macros_side_panel

To close the Macros pane, click side_panel_macro_close Close at the top of the pane, or click side_panel_macro Macros button on the Sidebar again.

Was this helpful?
Yes
No
Next
Find a macro