Note: This section doesn’t apply to JavaScript scripts.
You can deploy macro solutions to users for installation. You can deploy GMS files or workspaces, or both.
Deploying GMS files
Every document has an intrinsic GMS file. For this reason, you can explicitly distribute a macro as part of a document because when that document is opened, the user has immediate access to its macros. This deployment technique lets you, for example, set up a macro to track how much time the user has spent editing a document.
Alternatively, you can distribute the code module that contains the macro. However, this deployment method requires users to manually integrate the code module into an existing project file.
The simplest and most reliable way to deploy a macro project is to use its GMS file. To begin, you must export the GMS file from your computer. Then, each user must import the GMS file by using the Scripts docker. For more information, see the following procedures:
Deploying workspaces
Some macro solutions include a customized workspace that contains relevant toolbars, menus, and shortcut keys. You can deploy the features of a customized workspace to users by creating a Corel workspace (XSLT) file. You can export a subset of workspace features — such as individual menus, individual toolbars, or complete sets of shortcut keys — if you want users to install only those features, or you can export the entire workspace if you prefer. For more information, see To export workspace features.
Users can install customized workspace features by importing the XSLT files that you provide. For more information, see To import workspace features.
In Corel DESIGNER and CorelDRAW, users can also import workspace features by using the Application.ImportWorkspace method.
If you want, you can export each workspace feature to a separate file. Simply export one item at a time to create a series of XSLT files.
When you export shortcut keys, you export all shortcut keys. If you want to distribute only a few keys, create a new workspace, remove all shortcut keys from it, and then add only the desired keys.
If the name of an incoming toolbar is the same as an existing toolbar, the incoming toolbar is renamed.
If an imported command calls an uninstalled macro, it does not function.