Official Content

Runs the indicated Macro contained in the document, with the specified parameters.

Syntax

&DataType.RunMacro(MacroName [ , Par1 ... [ , Par30 ] ] )

Where:
Par1 ... Par30
   Are parameters used by the macro. 

Type Returned:
Numeric

Scope

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(…..)).

See Also

MacroReturnDate Property
MacroReturnNumber Property
MacroReturnText Property
ExcelDocument Data Type
WordDocument Data Type



Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant