User Guide > Managing Macro Sets and Macros > Macros > Creating Workspace-level Macros
Was this helpful?
Creating Workspace-level Macros
You can create global and non-global macros at workspace-level.
To create a new macro using the Preferences dialog:
1. Do any of the following:
Go to Options > Manage Macros.
Go to Options > Preferences. Expand DataConnect and click Macros.
The Preferences dialog is displayed.
2. In Macro Definition File, click Browse and specify the macro definition file where the macro must be saved. For more information about macro definition file, see Macro Definition Files.
3. In the Macro Sets section:
Select GLOBAL macro set to create a global macro.
Select any other macro set to create a non-global macro.
4. In Macros section, click /download/attachments/24975421/Map_Mapping_AddField_Icon.png?version=1&modificationDate=1487964026526&api=v2 to add a macro.
The new macro is added with a default name to the macros table and is highlighted so that you can change the macro name.
5. Click within the cells and specify the following information for the macro:
Macro Name: Type a unique name. The maximum number of characters is 198 and can include spaces.
Macro Value: If you want to assign a macro to a file or directory, click the /download/attachments/24975421/SelectIcon_WithinField.png?version=1&modificationDate=1487964026604&api=v2 and specify the directory. If you are using the macro to store a text string, then type the value in this field.
Encrypted: Select true to encrypt the macro. Else, select false. Macro values are displayed in plain text by default. When encryption is enabled, this macro value changes to a series of asterisks.
Description: Type a brief description for the macro.
Note:  You can click the Macro Name column heading to sort the macro names in ascending or descending order.
6. Click Apply and Close.
Tip...  You can also add a new macro by:
- Using the Create Macro menu option. For more information, see Creating Macro using Create Macro Menu Option.
- Selecting an existing text in a macro enabled text box. For more information, see Creating a Macro by Selecting a Value.
- Typing $(<macro-name>). For more information, see Creating Macros by Typing a Name.
Last modified date: 10/22/2024