2020.1

Table Of Contents
Exceptions
l EOleException The name is empty or invalid.
Add2(const String Name, const String Value, TAddFlags Flags, Integer Index (optional))
Fields only
Adds a new field to the collection. The behavior of the method when the specified name
already exists in the collection is determined by the Flags argument.
Parameters
Name
Name of the field to add. The name must adhere to this syntax rules: start with a letter,
followed by zero or more letters, numbers, underscore or dash. The name is not case-
sensitive.
Value
Value of the element. There is no restriction on the content, although binary is discouraged.
Flags
Additional flags for the method. This determines how the method behaves when the specified
name already exists.
afReplace 0 Overwrites the previous value with the new
afAppend 1 Appends the new value at the end of the previous one
afDuplicate 2 Creates a new field with the same name
afFail 3 Raise an error
Note
In an Active Script environment, such as the Run Script task, you must use the numerical
value, since the TAddFlags type is not defined in an Active Script environment.
Index (optional)
Page 234