Key Concepts > Using Legacy Macros |
You can run legacy Reflection and EXTRA! macros in InfoConnect. You can also use tools provided by InfoConnect to edit EXTRA! Basic macros, legacy Reflection Basic macros, and legacy Reflection VBA macros.
![]() |
Some properties and methods are not supported. If the macro contains unsupported objects, its functionality may be limited or it may not run. |
Running Legacy Reflection and EXTRA! Macros
Editing Legacy Reflection Macros
You can open a settings file in the workspace to run the macros it contains, or you can run macros from an external file. InfoConnect supports the following macro file formats:
![]() |
You can run RCL scripts only when a VT session document is active in the workspace. |
![]() |
Note: Legacy macro options are available only if compatibility features are installed. |
![]() |
Note: These macros include legacy settings files (.rsf, .r2w, or .r4w) and session documents (.rd3x, .rd5x, .rdox) that were previously converted from settings files. |
![]() |
Note: Legacy macro options are available only if compatibility features are installed. |
You can edit legacy Reflection macros in the Visual Basic Editor. However, some Session methods and properties are no longer supported.
If you are editing a legacy VBA macro, you can use the Visual Basic editor to modify the macro.
If you are editing a Reflection Basic macro:
Before you distribute any type of legacy macro, review the Unsupported Reflection Session Methods and Properties and remove any references to unsupported objects that throw exceptions.
![]() |
Note: For each legacy document, Reflection creates an additional VBA project for the supported legacy API. This legacy API VBA project includes a ThisSession object, which provides backward compatibility for legacy macros. (You can view the legacy API VBA project in the Project Explorer window of the Visual Basic Editor.) |
If you need to make changes to your legacy EXTRA! macros (.ebm), you can edit them using the EXTRA! Basic Editor.
To start the EXTRA! Basic Editor, you must first associate the Run EXTRA! Basic Editor action with a custom control, such as a button or a keyboard shortcut.
Then, edit the HostOptions properties in the macro to make the macro work with Reflection .
Before you distribute any type of legacy macro, review the Unsupported EXTRA! Methods and Properties and remove any references to unsupported objects that throw exceptions.
If your macro uses the HostOptions object, you will need to edit the HostOptions properties.
Legacy EXTRA! macros and Visual Basic applications that contain parameterized properties cause an error to occur in Reflection. When you run the macro or application, the HostOptions object returns the error "Method or property not found" if it encounters one of the following parameterized properties: AttributeForeground, AttributeBackground, or Color.
Reflection is based on C# and doesn't support parameterized properties; therefore, statements that get and set these properties will have no effect. To avoid this problem, replace the parameterized properties with an equivalent form.
For example, change
HostOptions.AttributeForeground(x) = y
to
HostOptions.set_AttributeForeground x, y
-or-
y = HostOptions.get_Attribute Foreground x