Runs the indicated Macro contained in the document, with the specified parameters.
&DataType.RunMacro(MacroName [ , Par1 ... [ , Par30 ] ] )
Where:
Par1 ... Par30
Are parameters used by the macro.
Type Returned:
Numeric
Extended Data Types: ExcelDocument, WordDocument
Generators: Visual Basic (up to GeneXus X Evolution 3), Visual FoxPro (up to GeneXus X Evolution 3)
Notes:
- The parameters are only input parameters. If the called macro returns values, these will remain stored in the MacroReturnText, MacroReturnNumber and MacroReturnDate properties, according to their types.
- There is a maximum of 30 parameters. This is a Word limitation.
- If this method is used with Office 97, it is not possible to use parameters. This is an Office 97 limitation. Thus, in this case, invoking MacroReturnText, MacroReturnNumber and MacroReturnDate properties is not possible either.
- This method returns an error code, so it is possible to call it as a function (&Err = &DataType.RunMacro(…..)).
MacroReturnDate Property
MacroReturnNumber Property
MacroReturnText Property
ExcelDocument Data Type
WordDocument Data Type