Programming with Reflection

image\rwnprg32.gif RunMacro method

 

Syntax object.RunMacro MacroName, [MacroData]

 

Description

Runs the specified Reflection macro. This property is only relevant if the control is using a settings file. You can designate a start up settings file using StartupSettings. (Note: To use Reflection for IBM macros, both the *.rsf and *.rvx files must be available.) For example, this statement runs the HelloWorld macro:

RibmCtrl.RunMacro "HelloWorld"

Arguments

MacroName Argument type: String
Required
Specifies the name of the macro to run.

 An error occurs if there is no macro of this name in the current settings file or in any referenced files.

 If macros of the same name are in your settings and a referenced file, use both the project name and the macro name to identify the macro. Place a period between the project and macro name. For example, "SharedMacros.Login" identifies the "Login" macro in the "SharedMacros" settings file.

MacroData Argument type: String
Optional
Sets Reflection's MacroData property using the specified string.

 

Note

· You can also configure the Reflection ActiveX control to run macros using the StartupMacro property. Macros specified using StartupMacro run before the Reflection control appears in the browser window. Macros executed using RunMacro always run after the control has appeared in the browser.

 

image\popup.gif Related Topics