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.
To record a macro, do the following:
1.Start recording in one of the following ways:
•On the Macros tab, click
Record macro (beta).
•When working in macOS, select Tools > Macros > Record macro (beta) command from the command menu.
•If there is at least one macro in the document, click
Macros on the Sidebar. In the Macros pane, click the
button to the right of the New macro button. In the drop-down list, select Record macro (beta).
2.Perform a sequence of actions that a macro should consist of.
3.Complete the recording in one of the following ways:
•On the Macros tab, click
Stop recording macro command.
•When working in macOS, select Tools > Macros > Stop recording macro command from the command menu.
•If there is at least one macro in the document, click
Macros on the Sidebar. In the Macros pane, click the
button to the right of the New macro button. In the drop-down list, select Stop recording macro.
•On the Status bar, click
Stop recording.
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
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
.
•If there is at least one macro in the document, click
Macros on the Sidebar. In the Macros pane, click New macro.
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.
3.Enter the code of the macro.
The new macro will be saved automatically.
When you add the first macro to your document, the
Macros button appears on the Sidebar. This button is displayed as long as there is at least one macro in the document.
Click
Macros to open Macros pane.
To close the Macros pane, click the
button at the top of the pane, or click
Macros button on the Sidebar again.