Programming with Reflection

image\rwnprg32.gif RunMacro method


Syntax object.RunMacro MacroName, [MacroData]



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.

For example, this statement runs the HelloWorld macro:

R1winCtrl.RunMacro "HelloWorld"


MacroName Argument type: String
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
Sets Reflection's MacroData property using the specified string.



· 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