Programming with Reflection
RunExternalMacro method
Syntax object.RunExternalMacro FileName, MacroName, [MacroData]
Runs a macro that is not in the current settings file. For example, the following statement runs a macro called InitialSetup in the specified Reflection for HP settings file:
Session.RunExternalMacro "C:\Mypath\Myfile.r1w", "InitialSetup"
This method is useful for running a macro that you only need to use once. By using this method, you can run the macro without adding a permanent reference to the file that contains it.
FileName Argument type: String
Required
The path and name of the file that contains the macro you want to run. This must be a settings file for the Reflection product you are using. An error is returned if you specify an invalid or nonexistent file.
MacroName Argument type: String
Required
The macro you want to run. An error is returned if the macro does not exist.
MacroData Argument type: String
Optional
Sets the value of the MacroData property.