INFO: Accessing Custom Attributes of Recipients

ID: Q178553

The information in this article applies to:

SUMMARY

The following table contains the property identifiers and property tags you can use to access the values of the Custom Attributes of Recipients on Microsoft Exchange Server.

   Custom
   Attribute   Property ID  Property Tag  Property Name
   ------------------------------------------------------------------------

    1          0x802D       0x802D001E    PR_EMS_EXTENSION_ATTRIBUTE_1
    2          0x802E       0x802E001E    PR_EMS_EXTENSION_ATTRIBUTE_2
    3          0x802F       0x802F001E    PR_EMS_EXTENSION_ATTRIBUTE_3
    4          0x8030       0x8030001E    PR_EMS_EXTENSION_ATTRIBUTE_4
    5          0x8031       0x8031001E    PR_EMS_EXTENSION_ATTRIBUTE_5
    6          0x8032       0x8032001E    PR_EMS_EXTENSION_ATTRIBUTE_6
    7          0x8033       0x8033001E    PR_EMS_EXTENSION_ATTRIBUTE_7
    8          0x8034       0x8034001E    PR_EMS_EXTENSION_ATTRIBUTE_8
    9          0x8035       0x8035001E    PR_EMS_EXTENSION_ATTRIBUTE_9
   10          0x8036       0x8036001E    PR_EMS_EXTENSION_ATTRIBUTE_10

MORE INFORMATION

Collaboration Data Objects (CDO)

To retrieve the property using Collaboration Data Objects (CDO) (formerly known as Active Messaging), use the Fields collection of the AddressEntry property on the Recipient object. Here is the syntax:

   objRecip.AddressEntry.Fields(&H########).Value

For example, the following code displays the value of Custom Attribute 7 in a message box. (This code assumes the variable objRecip points to a resolved Recipient object on Microsoft Exchange Server.)

   MsgBox objRecip.AddressEntry.Fields(&H8033001E).Value

For more information and a complete sample how to access properties of recipients from a Visual Basic application or Visual Basic Script, please see the following articles in the Microsoft Knowledge Base:

   ARTICLE-ID: Q179082
   TITLE     : HOWTO: Read Address Book Properties from ASP Page with
               VBScript

   ARTICLE-ID: Q179083
   TITLE     : HOWTO: Read Address Book Properties in Visual Basic

Extended MAPI

To retrieve the property using Extended MAPI, use the IMAPIProp::GetProps() method on the IMailUser object, or the HrGetOneProp() function. You must ensure that the recipient has been resolved to the Microsoft Exchange Server Global Address List.

REFERENCES

See the topics "Extension-Attribute-#" (where # is the number of the attribute) in the Microsoft Developer Network Library (MSDN). This topic can be found in the Microsoft Exchange Server Programmer's Reference.

Additional query words: ActMsg OleMsg

Keywords          : kbAPI kbCDO110 kbCDO120 kbCDO121 kbEDK kbMAPI kbMsg kbEDK500 kbMAPI100 kbGrpMsg 
Version           : WINDOWS:1.0,1.1,1.2,5.0,1.21
Issue type        : kbinfo

Last Reviewed: April 10, 1999