Navigation:  Object Model Reference > Macros Collection >

AddEx Method

Previous pageReturn to chapter overviewNext page

Adds or updates a Macro object in the collection.

 

Syntax

 

macros.AddEx(ByVal name As String, ByVal value As Variant = Empty, ByVal params As String = "", ByVal descr As String = "", ByVal envVar As Boolean = False, ByVal encrypt As Boolean = False) As IMacro

 

Arguments

 

macros

       Macros collection

 

name

       Required.  Name of the macro.  Names are compared without case sensitivity.

 

value

       Optional.  Value of the macro.

 

params

       Optional.  Parameters of the macro.

 

descr

       Optional.  Macro description.

 

envVar

       Optional.  Whether the macro will be added as an environment variable when building. Note: This property does not take effect from script code until the build is restarted.  Use a Set Macro action (see the Script.bld sample for a technique to dynamically generate a project with Set Macro steps and build it).

 

encrypt

       Optional.  Whether the macro value will be stored encrypted in the project file.

 

Return Value

       If the macro already exists, its properties are updated to the specified values.

 

See Also

 

Applies to Macros collection