Show Contents / Index / Search

Run a Startup Macro

You can set up a Visual Basic for Applications (VBA) macro to run when a Reflection workspace starts, rather than when a session opens and connects to the host.

This allows you to gather information about how users will connect and then use that information to configure session settings.

For example, you can create a startup macro to perform tasks such as:

  • displaying a VBA UserForm to gather information from the user before connecting to the host
  • reading from an .ini file
  • checking for host or router availability
  • configuring Reflection settings

    Caution: You can configure only macros in the Common project to run when the workspace starts. Do not configure the "Run Reflection Workspace Macro" action to run a macro present in a session document (rd0x, rd3x, rd5x). This prevents Reflection from starting properly.

To set up a startup macro

  1. Open the Reflection Workspace Settings dialog box as follows:

    If you are using this "look and feel"

    Do this...

    The Reflection button

    Microsoft Office 2007

    On the Reflection button The Reflection button , choose Reflection Workspace Settings.

    The Reflection button

    Microsoft Office 2010

    On the File menu, choose Reflection Workspace Settings.

    The Reflection button

    Reflection Browser

    On the Reflection menu, choose Settings and then Reflection Workspace Settings.

  2. Under Workspace Settings, click Configure Workspace Settings.
  3. Under Workspace and Documents, in the When starting workspace list, select Run Startup action.
  4. Click Select Action.
  5. Under Action, select Run Reflection Workspace Macro.
  6. Under Action parameters, choose Select macro.
  7. In the Select a macro box, select the macro you want to run when Reflection starts.

Related Topics

Creating and Using Macros

Run a Macro

Set Up a Workspace Startup Action Sequence