You can change a contact or a distribution list by using the Property object,
this object represent a single property of an entry. You can create a new
property for the entry by using the Add
method of the Properties collection. The property has a unique identifier represent by the
ID property. All
MAPI properties are represented by property tags. A property tag is a 32-bit
unsigned integer value that contains the property's identifier in the high order
16 bits and the property's type in the low order 16 bits. You have a list of properties you can use with the enumeration enumSchema.
Dim objSession, objContact, objProperty
Const PR_EMAIL_ADDRESS = &H3003001F
Const PR_BUSINESS_HOME_PAGE = &H3A51001F
Const PR_COMPANY_NAME = &H3A16001F
Set objContact = CreateNewContact( "John", "SMITH" )
' Adding an email address
objContact.Properties.Add PR_EMAIL_ADDRESS, "firstname.lastname@example.org"
' Adding the Web page property
objContact.Properties.Add PR_BUSINESS_HOME_PAGE, "http://www.mysociety.com"
' Adding the company name property
Set objProperty = objContact.Properties.Add(PR_COMPANY_NAME, "")
' Changing the company name property
objProperty.Value = "My Society Name"