Platform SDK: CDO 1.2.1

Value Property (Pattern Object)

The Value property indicates which property value or values are to be rendered using this pattern. Read/write.

Syntax

objPattern.Value

Data Type

Variant

Remarks

The Value property specifies a set of values for the property designated in the Format object’s Property property. If the designated property contains a value within this set of values, it is rendered as specified in the RenderUsing property.

You should set the Value property with the same data type as that of the format's designated property. However, a string consisting of a single asterisk (*) can be used to match all possible values of the designated property, no matter what its data type is.

If the designated property is a string, the Value property can have the following regular expressions embedded within it:

Regular
expression

Matching values
* Zero or more characters of any values.
? Exactly one character of any value.
[…] A single character matching any character within the brackets.
[x1-x2] A single character matching any character in the range between the characters x1 and x2 inclusive.

If the data type of the designated property is PT_BINARY, a valid hexadecimal string in the Value property is converted to a binary value for purposes of matching.

If no pattern can be found with a value match, or if no format has been defined for the renderable property, it is rendered by default according to its data type and value.

Common values of the Value property include:

      "*" 
      True 
      CdoLow 
      CdoCc 
      CdoFileLink 
      "*Urgent*" 
      "\\\\PAYROLL\\ARCHIVE\\198?\\B.XLS" 
      "All[ae]n H. Anders[eo]n" 
      "\\\\SERVER[1-5]\\PRODUCTS" 
 

The backslash character introduces an escape sequence in regular expression parsing, so you must use two consecutive backslashes to represent a single backslash.

Note that type library constants such as True, CdoLow, CdoCc, and CdoFileLink are not available in VBScript.