See Also Example Applies To Specifics
Creates a new custom document property. You can only add a new document property to the custom DocumentProperties collection.
Syntax
expression.Add(Name, LinkToContent, Type, Value, LinkSource)
expression Required. The custom DocumentProperties object.
Name Required String. The name of the property.
LinkToContent Required Boolean. Specifies whether the property is linked to the contents of the container document. If this argument is True, the LinkSource argument is required; if it's False, the value argument is required.
Type Required Long. The data type of the property. Can be one of the following MsoDocProperties constants: msoPropertyTypeBoolean, msoPropertyTypeDate, msoPropertyTypeFloat, msoPropertyTypeNumber, or msoPropertyTypeString.
Value Optional Variant. The value of the property, if it's not linked to the contents of the container document. The value is converted to match the data type specified by the type argument, if it can't be converted, an error occurs. If LinkToContent is True, the Value argument is ignored and the new document property is assigned a default value until the linked property values are updated by the container application (usually when the document is saved).
LinkSource Optional String. Ignored if LinkToContent is False. The source of the linked property. The container application determines what types of source linking you can use.
Remarks
If you add a custom document property to the DocumentProperties collection that’s linked to a given value in an Office document, you must save the document to see the change to the DocumentProperty object.