RDOContactItem object

 

RDOContactItem object represents an "IPM.Contact" message in one of Outlook's contacts folders. RDOContactItem is derived from the RDOMail object and as such inherits all the properties, methods and events implemented by the RDOMail object and adds the following methods and properties

 

Everywhere RDOMail object is normally returned (RDOSession.GetMessageFromID, RDOFolder.Items, etc), RDOContactItem will be returned if the message class is "IPM.Contact".

 

The example below creates and populates a new contact in the default Contacts folder.

set Session = CreateObject("Redemption.RDOSession")
Session.Logon
set ContactsFolder = Session.GetDefaultFolder(olFolderContacts)
set Contact = ContactsFolder.Items.Add("IPM.Contact")

Contact.Email1Address = "test1@dimastr.com"
Contact.Email2Address = "test2@dimastr.com"
Contact.FirstName = "Dmitry"
Contact.LastName = "Streblechenko"
Contact.Save

 

Properties

Methods

 


Derived from: RDOMail

In addition to all the properties and methods specific to RDOContactItem, it also implements all properties, methods and events of the RDOMail object, from which it is derived.


Properties


Anniversary

Returns or sets a Date indicating the anniversary date for the contact. Read/write.

 

 

AssistantName

Returns or sets a String representing the name of the person who is the assistant for the contact. Read/write.

 

 

AssistantTelephoneNumber

Returns or sets a String representing the telephone number of the person who is the assistant for the contact. Read/write.

 

 

Birthday

Returns or sets a Date indicating the birthday for the contact. Read/write.

 

 

Business2TelephoneNumber

Returns or sets a String representing the second business telephone number for the contact. Read/write.

 

 

BusinessAddress

Returns or sets a String representing the whole, unparsed business address for the contact. Read/write.

 

 

BusinessAddressCity

Returns or sets a String representing the city name portion of the business address for the contact. Read/write.

 

 

BusinessAddressCountry

Returns or sets a String representing the country/region code portion of the business address for the contact. Read/write.

 

 

BusinessAddressPostalCode

Returns or sets a String representing the postal code (zip code) portion of the business address for the contact. Read/write.

 

 

BusinessAddressPostOfficeBox

Returns or sets a String representing the post office box number portion of the business address for the contact. Read/write.

 

 

BusinessAddressState

Returns or sets a String representing the state code portion of the business address for the contact. Read/write.

 

 

BusinessAddressStreet

Returns or sets a String representing the street address portion of the business address for the contact. Read/write.

 

 

BusinessCardLayoutXml
Returns or sets a String that represents the XML markup for the layout of the Electronic Business Card. Read/write.
 
BusinessCardType
Returns an rdoBusinessCardType constant that specifies the type of Electronic Business Card used by this contact. Read-only.
 

BusinessFaxNumber

Returns or sets a String representing the business fax number for the contact. Read/write.

 

 

BusinessHomePage

Returns or sets a String representing the URL of the business Web page for the contact. Read/write.

 

 

BusinessTelephoneNumber

Returns or sets a String representing the first business telephone number for the contact. Read/write.

 

 

CallbackTelephoneNumber

Returns or sets a String representing the callback telephone number for the contact. Read/write.

 

 

CarTelephoneNumber

Returns or sets a String representing the car telephone number for the contact. Read/write.

 

 

Children

Returns or sets a String representing the names of the children of the contact. Read/write.

 

 

CompanyAndFullName

Returns a String representing the concatenated company name and full name for the contact. Read-only.

 

 

CompanyLastFirstNoSpace

Returns a String representing the company name for the contact followed by the concatenated last name, first name, and middle name with no space between the last and first names. This property is parsed from the CompanyName, LastName, FirstName and MiddleName properties. Read-only.

 

 

CompanyLastFirstSpaceOnly

Returns a String representing the company name for the contact followed by the concatenated last name, first name, and middle name with spaces between the last, first, and middle names. This property is parsed from the CompanyName, LastName, FirstName and MiddleName properties. Read-only.

 

 

CompanyMainTelephoneNumber

Returns or sets a String representing the company main telephone number for the contact. Read/write.

 

 

CompanyName

Returns or sets a String representing the company name for the contact. Read/write.

 

 

ComputerNetworkName

Returns or sets a String representing the name of the computer network for the contact. Read/write.

 

 

ContactAccount

Returns or sets a String representing the account for the contact. Read/write.

Note: this property corresponds to the ContactItem.Account in the Outlook Object Model. Since Account property is used by the RDOMail object (from which RDOContactItem is derived) to represent the e-mail account used to send or receive the message (not applicable to contacts), this property is called ContactAccount in Redemption.

 

 

CustomerID

Returns or sets a String representing the customer ID for the contact. Read/write.

 

Department

Returns or sets a String representing the department name for the contact. Read/write.

 

 

Email1Address

Returns or sets a String representing the e-mail address of the first e-mail entry for the contact. Read/write.

 

 

Email1AddressType

Returns or sets a String representing the address type (such as EX or SMTP) of the first e-mail entry for the contact. This is a free-form text field, but it must match the actual type of an existing e-mail transport. Read/write.

 

 

Email1DisplayName

Returns or sets a String representing the display name of the first e-mail address for the contact. This property is set to the value of the FullName property by default. Read/write.

Note: unlike Outlook object model, this property is settable in Redemption.

 

 

Email1EntryID

Returns or sets a String representing the entry ID of the first e-mail address for the contact. Read/write.

Note: unlike Outlook object model, this property is settable in Redemption. When set, Email1Address, Email1DisplayName and Email1DisplayName will be reset to the values retrieved from the Address Book object opened using the specified entry id.

If not set, it will be populated from the values of the Email1Address, Email1DisplayName and Email1DisplayName properties when the contact is saved.

 

 

Email1SmtpAddress
Returns or sets the SMTP address.
Unlike Email1Address, it guaranteed to always return an SMTP address (if available).
 

Email2Address

Returns or sets a String representing the e-mail address of the second e-mail entry for the contact. Read/write.

 

Email2AddressType

Returns or sets a String representing the address type (such as EX or SMTP) of the second e-mail entry for the contact. This is a free-form text field, but it must match the actual type of an existing e-mail transport. Read/write.

 

 

Email2DisplayName

Returns or sets a String representing the display name of the second e-mail address for the contact. This property is set to the value of the FullName property by default. Read/write.

Note: unlike Outlook object model, this property is settable in Redemption.

 

 

Email2EntryID

Returns or sets a String representing the entry ID of the second e-mail address for the contact. Read/write.

Note: unlike Outlook object model, this property is settable in Redemption. When set, Email2Address, Email2DisplayName and Email2DisplayName will be reset to the values retrieved from the Address Book object opened using the specified entry id.

If not set, it will be populated from the values of the Email2Address, Email2DisplayName and Email2DisplayName properties when the contact is saved.

 

 

Email2SmtpAddress
Returns or sets the SMTP address.
Unlike Email2Address, it guaranteed to always return an SMTP address (if available).
 

Email3Address

Returns or sets a String representing the e-mail address of the third e-mail entry for the contact. Read/write.

 

 

Email3AddressType

Returns or sets a String representing the address type (such as EX or SMTP) of the third e-mail entry for the contact. This is a free-form text field, but it must match the actual type of an existing e-mail transport. Read/write.

 

 

Email3DisplayName

Returns or sets a String representing the display name of the third e-mail address for the contact. This property is set to the value of the FullName property by default. Read/write.

Note:unlike Outlook object model, this property is settable in Redemption.

 

 

Email3EntryID

Returns or sets a String representing the entry ID of the third e-mail address for the contact. Read/write.

Note: unlike Outlook object model, this property is settable in Redemption. When set, Email3Address, Email3DisplayName and Email3DisplayName will be reset to the values retrieved from the Address Book object opened using the specified entry id.

If not set, it will be populated from the values of the Email3Address, Email3DisplayName and Email3DisplayName properties when the contact is saved.

 

 

Email3SmtpAddress
Returns or sets the SMTP address.
Unlike Email3Address, it guaranteed to always return an SMTP address (if available).
 

FileAs

Returns or sets a String indicating the default keyword string assigned to the contact when it is filed. Read/write.

Setting the FileAs property resets the FileUnderId property to fasAdHoc - this way even if other name properties (first, last, company name, etc) are set, the value of FileAs will not be automatically recalculated.

FileAs property is recalculated when the contact is saved

 

 

FileUnderId

Integer, one of the rdoFileUnderId enums - Read/Write.

Returns or sets the method used by Redemption and Outlook to calculate the value of the FileAs property. Unless this property is set to fasAdHoc, FileAs property will be rebuilt from other name properties (first, last, company name, etc).

FileAs property is recalculated when the contact is saved

 

Valid rdoFileUnderId values:

 

fasAdHoc (0) - the value of FileAs is never recalculated; the explicitly set value is always used.
fasLastFirstMiddle (1) - FileAs is calculated as "Last, First Middle"
fasFirstMiddleLastSuffix (2) - FileAs is calculated as "First Middle Last Suffix"
fasCompany (3) - FileAs is calculated as "Company"
fasLastFirstMiddleCompany (4) - FileAs is calculated as "Last, First Middle (Company)"
fasCompanyLastFirstMiddle (5) - FileAs is calculated as "Company (Last, First Middle)"

 

'Create a new contact with FileAs set to "Company (Last, First Middle)"

'  "ACME Inc (Smith, John)"

set Session = CreateObject("Redemption.RDOSession")
Session.Logon
set Contact = Session.GetDefaultFolder(olFolderContacts).Items.Add
Contact.CompanyName = "ACME Inc"
Contact.FirstName = "John"
Contact.LastName = "Smith"
Contact.Email1Address = "jsmith@acmeinc.demo"

Contact.FileUnderId = fasCompanyLastFirstMiddle
Contact.Save

FirstName

Returns or sets a String representing the first name for the contact. Read/write.

 

 

FTPSite

Returns or sets a String representing the FTP site entry for the contact. Read/write.

 

 

FullName

Returns or sets a String specifying the whole, unparsed full name for the contact. Read/write.

 

 

FullNameAndCompany

Returns a String representing the full name and company of the contact by concatenating the values of the FullName and CompanyName properties. Read-only.

 

 

Gender

Returns or sets an rdoGender constant indicating the gender of the contact. Read/write.

rdoUnspecified 0

rdoFemale = 1
rdoMale = 2

 

 

GovernmentIDNumber

Returns or sets a String representing the government ID number for the contact. Read/write.

 

 

HasPicture

True if a Contacts item has a picture associated with it. Read-only Boolean.

 

 

Hobby

Returns or sets a String representing the hobby for the contact. Read/write.

 

 

Home2TelephoneNumber

Returns or sets a String representing the second home telephone number for the contact. Read/write.

 

 

HomeAddress

Returns or sets a String representing the full, unparsed text of the home address for the contact. Read/write.

 

 

HomeAddressCity

Returns or sets a String representing the city portion of the home address for the contact. Read/write.

 

 

HomeAddressCountry

Returns or sets a String representing the country/region portion of the home address for the contact. Read/write.

 

 

HomeAddressPostalCode

Returns or sets a String representing the postal code portion of the home address for the contact. Read/write.

 

 

HomeAddressPostOfficeBox

Returns or sets a String the post office box number portion of the home address for the contact. Read/write.

 

 

HomeAddressState

Returns or sets a String representing the state portion of the home address for the contact. Read/write.

 

 

HomeAddressStreet

Returns or sets a String representing the street portion of the home address for the contact. Read/write.

 

 

HomeFaxNumber

Returns or sets a String representing the home fax number for the contact. Read/write.

 

 

HomeTelephoneNumber

Returns or sets a String representing the first home telephone number for the contact. Read/write.

 

 

IMAddress

Returns or sets a String that represents a contact's Microsoft Instant Messenger address. Read/write.

 

 

Initials

Returns or sets a String representing the initials for the contact. Read/write.

 

 

InternetFreeBusyAddress

Returns or sets a String corresponding to the Address box on the Details tab for a contact. This box can contain the URL location of the user's free-busy information in vCard Free-Busy standard format. Read/write.

 

 

ISDNNumber

Returns or sets a String representing the ISDN number for the contact. Read/write.

 

 

JobTitle

Returns or sets a String representing the job title for the contact. Read/write.

 

 

Journal

True if the transaction of the contact will be journalized. The default value is False. Read/write Boolean.

 

 

Language

Returns or sets the language setting for the object that defines the language used in the menu. The Language property uses a String to represent an ISO language tag. For example, the string "EN-US" represents the ISO code for "United States - English." Read/write.

 

 

LastFirstAndSuffix

Returns a String representing the last name, first name, middle name, and suffix of the contact. There is a comma between the last and first names and spaces between all the names and the suffix. This property is parsed from the LastName, FirstName, MiddleName and Suffix properties. Read-only.

 

 

LastFirstNoSpace

Returns a String representing the concatenated last name, first name, and middle name of the contact with no space between the last name and the first name. This property is parsed from the LastName, FirstName and MiddleName properties. Read-only.

 

 

LastFirstNoSpaceAndSuffix

Returns the last name, first name, and suffix of the user without a space. Read-only String.

 

 

LastFirstNoSpaceCompany

Returns a String representing the concatenated last name, first name, and middle name of the contact with no space between the last name and the first name. The company name for the contact is included after the middle name. This property is parsed from the LastName, FirstName, MiddleName, and CompanyName properties. Read-only.

 

 

LastFirstSpaceOnly

Returns a String representing the concatenated last name, first name, and middle name of the contact with spaces between them. This property is parsed from the LastName, FirstName and MiddleName properties. Read-only.

 

 

LastFirstSpaceOnlyCompany

Returns a String representing the concatenated last name, first name, and middle name of the contact with spaces between them. The company name for the contact is after the middle name. This property is parsed from the LastName, FirstName, MiddleName, and CompanyName properties. Read-only.

 

 

LastName

Returns or sets a String representing the last name for the contact. Read/write.

 

 

LastNameAndFirstName

Returns a String representing the concatenated last name and first name for the contact. Read-only.

 

 

MailingAddress

Returns or sets a String representing the full, unparsed selected mailing address for the contact. Read/write.

 

 

MailingAddressCity

Returns or sets a String representing the city name portion of the selected mailing address of the contact. Read/write.

 

 

MailingAddressCountry

Returns or sets a String representing the country/region code portion of the selected mailing address of the contact. Read/write.

 

 

MailingAddressPostalCode

Returns or sets a String representing the postal code (zip code) portion of the selected mailing address of the contact. Read/write.

 

 

MailingAddressPostOfficeBox

Returns or sets a String representing the post office box number portion of the selected mailing address of the contact. Read/write.

 

 

MailingAddressState

Returns or sets a String representing the state code portion for the selected mailing address of the contact. Read/write.

 

 

MailingAddressStreet

Returns or sets a String representing the street address portion of the selected mailing address of the contact. Read/write.

 

 

ManagerName

Returns or sets a String representing the manager name for the contact. Read/write.

 

 

MiddleName

Returns or sets a String representing the middle name for the contact. Read/write.

 

 

MobileTelephoneNumber

Returns or sets a String representing the mobile telephone number for the contact. Read/write.

 

 

NetMeetingAlias

Returns or sets a String indicating the user's Microsoft NetMeeting ID, or alias. Read/write.

 

 

NetMeetingServer

Returns or sets a String specifying the name of the Microsoft NetMeeting server being used for an online meeting. Read/write.

 

 

NickName

Returns or sets a String representing the nickname for the contact. Read/write.

 

 

OfficeLocation

Returns or sets a String specifying the specific office location (for example, Building 1 Room 1 or Suite 123) for the contact. This property corresponds to the MAPI property PR_OFFICE_LOCATION. Read/write.

 

 

OrganizationalIDNumber

Returns or sets a String representing the organizational ID number for the contact. Read/write.

 

 

OtherAddress

Returns or sets a String representing the other address for the contact. Read/write.

 

 

OtherAddressCity

Returns or sets a String representing the city portion of the other address for the contact. Read/write.

 

 

OtherAddressCountry

Returns or sets a String representing the country/region portion of the other address for the contact. Read/write.

 

 

OtherAddressPostalCode

Returns or sets a String representing the postal code portion of the other address for the contact. Read/write.

 

 

OtherAddressPostOfficeBox

Returns or sets a String representing the post office box portion of the other address for the contact. Read/write.

 

 

OtherAddressState

Returns or sets a String representing the state portion of the other address for the contact. Read/write.

 

 

OtherAddressStreet

Returns or sets a String representing the street portion of the other address for the contact. Read/write.

 

 

OtherFaxNumber

Returns or sets a String representing the other fax number for the contact. Read/write.

 

 

OtherTelephoneNumber

Returns or sets a String representing the other telephone number for the contact. Read/write.

 

 

PagerNumber

Returns or sets a String representing the pager number for the contact. Read/write.

 

 

PersonalHomePage

Returns or sets a String representing the URL of the personal Web page for the contact. Read/write.

 

 

PrimaryTelephoneNumber

Returns or sets a String specifying the primary telephone number for the contact. Read/write.

 

 

Profession

Returns or sets a String indicating the profession for the contact. Read/write.

 

 

RadioTelephoneNumber

Returns or sets a String indicating the radio telephone number for the contact. Read/write.

 

 

ReferredBy

Returns or sets a String specifying the referral name entry for the contact. Read/write.

 

 

SelectedMailingAddress

Returns or sets an rdoMailingAddress constant indicating the type of the mailing address for the contact. Read/write.

SelectedMailingAddress can be one of these rdoMailingAddress constants.

rdoNone = 0
rdoHome = 1
rdoBusiness = 2
rdoOther = 3

 

 

Spouse

Returns or sets a String indicating the spouse name entry for the contact. Read/write.

 

 

Suffix

Returns or sets a String indicating the name suffix (such as Jr., III, or Ph.D.) for the specified contact. Read/write.

 

 

TelexNumber

Returns or sets a String indicating the telex number for the contact. Read/write.

 

 

Title

Returns or sets a String indicating the title for the contact. Read/write.

 

 

TTYTDDTelephoneNumber

Returns or sets a String specifying the TTY/TDD telephone number for the contact. Read/write.

 

 

User1

Returns or sets a String specifying the first Microsoft Schedule+ user for the contact. Read/write.

 

 

User2

Returns or sets a String specifying the second Microsoft Schedule+ user for the contact. Read/write.

 

 

User3

Returns or sets a String specifying the third Microsoft Schedule+ user for the contact. Read/write.

 

 

User4

Returns or sets a String specifying the fourth Microsoft Schedule+ user for the contact. Read/write.

 

 

UserCertificate

This property is not functional and is not intended for use.

 

 

WebPage

Returns or sets a String indicating the URL of the Web page for the contact. Read/write.

 

 

YomiCompanyName

Returns or sets a String indicating the Japanese phonetic rendering (yomigana) of the company name for the contact. Read/write.

 

 

YomiFirstName

Returns or sets a String indicating the Japanese phonetic rendering (yomigana) of the first name for the contact. Read/write.

 

 

YomiLastName

Returns or sets a String indicating the Japanese phonetic rendering (yomigana) of the last name for the contact. Read/write.

 

 


Methods


AddBusinessCardLogoPicture(Path) Adds a logo picture to the current Electronic Business Card of the contact item.

Path - string
set Session = CreateObject("Redemption.RDOSession")
Session.MAPIOBJECT = Application.Session.MAPIOBJECT
set Contact = Session.GetMessageFromID(Application.ActiveExplorer.Selection(1).EntryID)
contact.AddBusinessCardLogoPicture "Z:\Camera\People\user.jpg"
contact.Save

AddPicture(Path)

Adds a picture to a contact item.

Note: unlike Outlook Object Model, Redemption does not resize or crop the picture; it is added as-is.

 

 

ForwardAsVCard

Forwards the contact as a vCard, the Internet standard for creating and sharing virtual business cards. The ForwardAsVcard method returns an RDOMail with the vCard file attached.

 

 

RemovePicture

Removes a picture from the contact

 

 
ResetBusinessCard Resets the Electronic Business Card on the contact item to the default business card, deleting any custom layout and logo on the Electronic Business Card.