_MAPIProp object


_MAPIProp is the base interface from which other RDO objects are derived: IRDOFolder, IRDOAddressBook, IRDOStore, IRDOMail, IRDOAttachment, IRDOAddressEntry, IRDOAddressList

It corresponds to the IMAPIProp Extended MAPI interface.


The example below connects to a MAPI session retrieved from the Outlook Object Model, opens the given Outlook MailItem as Redemption.RDOMail (which is derived from _MAPIProp), then displays the subject of the message using various techniques: using a DASL schema property name and the regular PR_SUBJECT Extended MAPI property tag.

set Session = CreateObject("Redemption.RDOSession")
Session.MAPIOBJECT = Application.Session.MAPIOBJECT
set Mail = Session.GetMessageFromID(MailItem.EntryID)


'display the subject using a DASL schema name
MsgBox Mail.Fields("urn:schemas:httpmail:subject")


'or display the subject using a DASL schema name that treats the subject as a generic MAPI property

MsgBox Mail.Fields("http://schemas.microsoft.com/mapi/proptag/0x0037001E")


'or we can also use the regular PR_xxx integer property tag

PR_SUBJECT = &H0037001E

MsgBox Mail.Fields(PR_SUBJECT)


The following example accesses the Inbox folder and opens the PR_CONTAINER_CONTENTS property as Redemption.MAPITable object, and displays the number of items in the folder. Note that the same result can be achieved by using the RDOFolder.Items.Count property

set Session = CreateObject("Redemption.RDOSession")
Session.MAPIOBJECT = Application.Session.MAPIOBJECT
set Folder = Session.GetDefaultFolder(olFolderInbox)
set MAPITable = Folder.Fields(PR_CONTAINER_CONTENTS)
MsgBox MAPITable.RowCount





Derived from: IDispatch



Returns or sets an Extended MAPI property

PropTag - either a DASL property name or an in integer Extended MAPI property tag. CDO named property format (see CDOLive) is also supported.

You can use one of the MAPITags enumeration elements, e.g. MAPITags.PR_SUBJECT.

E.g. to read the PR_SUBJECT property, one can use the following values of the PropTag parameter:

0x0037001E (integer)



E.g. to access the ReminderSet named property ({00062008-0000-0000-C000-000000000046}, 0x8503, PT_BOOLEAN), one can use either call GetIDsFromNames to retrieve the integer prop tag and then use Fields or skip GetIDsFromNames and use Fields with one of the following tags:




Scalar properties are returned as variants of the corresponding type (e.g. PT_STRING8 and PT_UNICODE properties are returned as strings, PT_LONG as integers, etc).

For the object properties (PT_OBJECT, such as PR_CONTAINER_CONTENTS, PR_ACL_TABLE, etc) Redemption tries to open them as IMAPITable Extended MAPI object and, if successful, returns an instance of the Redemption.MAPITable object


See example above and below


IUnknown, read-only.

Returns the Extended MAPI object used internally by the RDO object; e.g. IMessage for the RDOMailObject, IMailUser for RDOAddressEntry, etc.




RDOSession, read-only. Returns the parent Session object



GetIDsFromNames(GUID, ID)

Returns an id suitable for use in the Fields() collection given the GUID (as string) and ID (can be either integer or a string).

For the discussion of the named properties, see the Extended
MAPI properties
section, especially the section on named properties.

'Is the reminder set for the given message?


PR_REMINDER_SET = RDOMail.GetIdsFromNames("{00062008-0000-0000-C000-000000000046}", &H8503)



'the same property can be accessed using the DASL property name

MsgBox RDOMail.Fields("http://schemas.microsoft.com/mapi/id/{00062008-0000-0000-C000-000000000046}/8503000B")

'or using the CDO 1.21 named property tag format

MsgBox RDOMail.Fields("{0820060000000000C000000000000046}0x8503")

GetPropList(Flags, UseUnicode)

Returns PropList collection that represents all properties exposed by the object.


Flags - integer. Not currently used.

UseUnicode, optional, boolean. Pass TRUE to force GetPropList to return Unicode property tags.


set PropList = RDOMail.GetPropList
for i = 1 to PropList.Count

GetNamesFromIDs(MAPIProp, PropTag)

Given a prop tag (>=0x80000000), returns the GUID and id of the named property. This is the reverse of the GetIDsFromNames method.

Returns a NamedProperty object which exposes two properties: GUID (string) and ID (either an integer or a string)


MAPIProp - IUnknown. Not used, pass NULL.

PropTag - integer, the named property tag (>=0x80000000).




Copies the object to the target object. The exact behavior depends on the source and target objects.




Saves the object. Note that some objects (such as Store) are not transacted, hence Save is not required. Other objects (such as messages) require the changes to be saved if you want to persist them.

RDOMail.Subject = "New subject"