Programming with Reflection

image\rwnprg32.gif RunExternalMacro method

 

Syntax object.RunExternalMacro FileName, MacroName, [MacroData]

 

Description

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.

Arguments

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.

 

 

image\jump.gif Keyword Index

image\popup.gif Related Topics

image\popup.gif Reflection products that use this command