Skip to content

Walkthrough to Set up and deploy a SharedMacros file

This walkthrough shows how to set up a SharedMacros.rd3x file and create an MSI file that can be used to deploy that file to users.

note

Reflection Desktop supports shared VBA macros for IBM ( .rd5x and .rd3x) and VT ( .rdox) session documents.The SharedMacros settings files have the same extensions as their corresponding session document files:

IBM 5250: SharedMacros.rd5x

IBM 3250: SharedMacros.rd3x

VT: SharedMacros.rdox

Set up and Test a SharedMacros file

First, you'll need to set up and test your SharedMacros file. After you test the macros in this file, consider locking them and password protecting them so that users cannot change them.

Make sure the VBA projects in the SharedMacros files have unique project names. Each project name in the VBA Project editor must be unique to avoid errors caused by naming conflicts. You can change project names by modifying the project properties in the VBA editor or by creating and saving the SharedMacros files in Reflection Desktop 16.2 or greater.

To develop and test a SharedMacros file

  1. Develop the macros you want to share.

  2. Make sure the macro projects have unique names and save them in a session document named SharedMacros.rd3x in the user data directory.

    note

    The default user data directory is %USERPROFILE%\Documents\Micro Focus\Reflection

  3. If you want to set up a toolbar button or menu item to run a shared macro, open the UI Designer on the Appearance tab and set the action for the button (or menu item) to run the macro.

    note

    For more about setting up a button or menu item, see "Customize the Ribbon" or "Customize Classic Menus and Toolbars" in the Reflection Help.

  4. Run and test the macros in your session documents and modify the macros as needed.

  5. To prevent users from modifying the shared macros, consider locking and password protecting them.

  6. To "lock down" UI Designer settings, see Control Access to Lock Down Settings and Controls.

Deploy the SharedMacros.rd3x file

After you have developed and tested your macros, you'll need to deploy the SharedMacros.rd3x file to users, along with related settings, such as toolbar or ribbon buttons. This includes:

  • The SharedMacros files(the .rd5x, .rdox, or . rd3x files) that contain the shared macros.

  • A custom ribbon ( .xuml) file that includes any buttons or menu items you added to run the macros.

To create an MSI file for a SharedMacros file

  1. Verify the location of the user data folder and make sure you know where the session files and their related settings you want to add are located. For this example, we are packaging the files in the following locations:

    Add this file In this directory
    SharedMacros.rd3x %USERPROFILE%\Documents\Micro Focus\Reflection\
    myRibbon.xuml %USERPROFILE%\Documents\Micro Focus\Reflection\CustomUI
  2. On your administrative workstation, open the Installation Customization Tool from a desktop shortcut or from a command line as follows:

    path_to_setup\setup.exe /admin

  3. In the Select Customization dialog box, choose Create a new Companion installer.

    The Installation Customization Tool opens in the mode used to create companion installer packages.

  4. From the Navigation pane, click Specify package information.

    • In the Add/Remove name box, enter the name for the package that you want to appear in the Windows Uninstall or change a program list.

    • In the Organization name box, enter the name of your department.

  5. From the Navigation pane, click Specify install locations. Then, under Installation type, select Installs only for the user who installs it.

  6. In the Navigation pane, select Add Files. Then, in the Add files to list, select [PersonalFolder]and type in:

    \Micro Focus\Reflection\CustomUI

    When you are done, the list entry is:

    [PersonalFolder]\Micro Focus\Reflection\CustomUI

    note

    [PersonalFolder] is the full path to the Documents folder for the current user. The default is C:\Users\username\Documents.

  7. Click Add. Then browse to the configuration file ( myRibbon.xuml) and click Open.

  8. In the Add file to list, select [PersonalFolder] and type in:

    \Micro Focus\Reflection\

    When you are done, the list entry is:

    [PersonalFolder]\Micro Focus\Reflection

    note

    Be sure to specify the correct location for each file you add. Reflection looks for configuration files in specific locations. To find the correct file locations for any type of file see Customized Files that Must be Deployed to Specific Locations.

  9. Click Add. Then browse to the SharedMacros.rd3xfile.

    When you are finished adding files, the panel should look similar to the following:

  10. From the File menu, save the package as an .msi file on the administrative installation point.