Accessing Contact details through CDO

Accessing Contact details through CDO

Post by Chris Hodgen » Thu, 11 Feb 1999 04:00:00



I am having problems trying to retrieve fields from the contacts form
within exchange with CDO.  I have tried  

        Const ITEM = "{0420060000000000C000000000000046}0x8003"

Set o = objFields(ITEM)

        But I always get a MAPI_E_NOT_FOUND error.  The value for the
field I retrieved using the mdb viewer app.  I am trying to do this
through VB5 and CDO to exchange.

Help.

Chris

 
 
 

Accessing Contact details through CDO

Post by Siegfried Webe » Thu, 11 Feb 1999 04:00:00


I'm not sure which field of the contact you are trying to access but I can't find the prop tag you have mentioned. I'm just busy writing a sample VB6 app which uses CDO to pull out (at least) all Outlook contact MAPI properties. Here is a list of all MAPI properties I've currently figured out.

Hope that help!
--
</Siegfried>

PS: If the app is finished you'll find it on http://www.cdolive.com

' Name MAPI property tags
Public Const CdoPR_DISPLAY_NAME = &H3001001F                                                        ' Item.FullName
Public Const CdoPR_TITLE = &H3A17001F                                                               ' Item.JobTitle
Public Const CdoPR_COMPANY_NAME = &H3A16001F                                                        ' Item.CompanyName
Public Const CdoPR_DISPLAY_NAME_PREFIX = &H3A45001E                                                 ' Item.Title
Public Const CdoPR_SURNAME = &H3A11001E                                                             ' Item.LastName
Public Const CdoPR_MIDDLE_NAME = &H3A44001F                                                         ' Item.MiddleName
Public Const CdoPR_GIVEN_NAME = &H3A06001F                                                          ' Item.FirstName
Public Const CdoPR_GENERATION = &H3A05001E                                                          ' Item.Suffix
Public Const CdoPR_BUSINESS_HOME_PAGE = &H3A51001F                                                  ' Item.WebPage
Public Const CdoPR_PERSONAL_HOME_PAGE = &H3A50001F                                                  ' Item.PersonalHomePage
Public Const CdoPR_FTP_SITE = &H3A4C001E                                                            ' Item.FTPSite
Public Const CdoPR_INITIALS = &H3A0A001E                                                            ' Item.Initials

' Non-documented name contact property tags
Public Const AMPidTag_FileUnder = "{0420060000000000C000000000000046}0x8005"                        ' Item.FileAs
Public Const AMPidTag_CompanyAndFullName = "{0420060000000000C000000000000046}0x8018"               ' Item.CompanyAndFullName
Public Const AMPidTag_CompanyLastFirstNoSpace = "{0420060000000000C000000000000046}0x8032"          ' Item.CompanyLastFirstNoSpace
Public Const AMPidTag_CompanyLastFirstSpaceOnly = "{0420060000000000C000000000000046}0x8033"        ' Item.CompanyLastFirstSpaceOnly
Public Const AMPidTag_FullNameAndCompany = "{0420060000000000C000000000000046}0x8019"               ' Item.FullNameAndCompany
Public Const AMPidTag_LastFirstAndSuffix = "{0420060000000000C000000000000046}0x8036"               ' Item.LastFirstAndSuffix
Public Const AMPidTag_LastFirstNoSpace = "{0420060000000000C000000000000046}0x8030"                 ' Item.LastFirstNoSpace
Public Const AMPidTag_LastFirstNoSpaceCompany = "{0420060000000000C000000000000046}0x8034"          ' Item.LastFirstNoSpaceCompany
Public Const AMPidTag_LastFirstSpaceOnly = "{0420060000000000C000000000000046}0x8031"               ' Item.LastFirstSpaceOnly
Public Const AMPidTag_LastFirstSpaceOnlyCompany = "{0420060000000000C000000000000046}0x8035"        ' Item.LastFirstSpaceOnlyCompany
Public Const AMPidTag_LastNameAndFirstName = "{0420060000000000C000000000000046}0x8017"             ' Item.LastNameandFirstName

' Non-documented e-mail contact property tags
Public Const AMPidTag_EmailOriginalDisplayName = "{0420060000000000C000000000000046}0x8084"         ' Item.EMail1DisplayName
Public Const AMPidTag_EmailAddress = "{0420060000000000C000000000000046}0x8083"                     ' Item.EMail1Address
Public Const AMPidTag_EmailAddrType = "{0420060000000000C000000000000046}0x8082"                    ' Item.EMail1AddressType
Public Const AMPidTag_EmailAddrEntryID = "{0420060000000000C000000000000046}0x8085"                 ' Item.EMail1EntryID
Public Const AMPidTag_Email2OriginalDisplayName = "{0420060000000000C000000000000046}0x8094"        ' Item.EMail2DisplayName
Public Const AMPidTag_Email2Address = "{0420060000000000C000000000000046}0x8093"                    ' Item.EMail2Address
Public Const AMPidTag_Email2AddrType = "{0420060000000000C000000000000046}0x8092"                   ' Item.EMail2AddressType
Public Const AMPidTag_Email2AddrEntryID = "{0420060000000000C000000000000046}0x8095"                ' Item.EMail2EntryID
Public Const AMPidTag_Email3OriginalDisplayName = "{0420060000000000C000000000000046}0x80A4"        ' Item.EMail3DisplayName
Public Const AMPidTag_Email3Address = "{0420060000000000C000000000000046}0x80A3"                    ' Item.EMail3Address
Public Const AMPidTag_Email3AddrType = "{0420060000000000C000000000000046}0x80A2"                   ' Item.EMail3AddressType
Public Const AMPidTag_Email3AddrEntryID = "{0420060000000000C000000000000046}0x80a5"                ' Item.EMail3EntryID

' Phone MAPI property tags
Public Const CdoPR_ASSISTANT_TELEPHONE_NUMBER = &H3A2E001F                                          ' Item.AssistantTelephoneNumber
Public Const CdoPR_BUSINESS_TELEPHONE_NUMBER = &H3A08001F                                           ' Item.BusinessTelephoneNumber
Public Const CdoPR_BUSINESS2_TELEPHONE_NUMBER = &H3A1B001F                                          ' Item.Business2TelephoneNumber
Public Const CdoPR_BUSINESS_FAX_NUMBER = &H3A24001F                                                 ' Item.BusinessFaxNumber
Public Const CdoPR_CALLBACK_TELEPHONE_NUMBER = &H3A02001F                                           ' Item.CallbackTelephoneNumber
Public Const CdoPR_CAR_TELEPHONE_NUMBER = &H3A1E001F                                                ' Item.CarTelephoneNumber
Public Const CdoPR_COMPANY_MAIN_PHONE_NUMBER = &H3A57001F                                           ' Item.CompanyMainTelephoneNumber
Public Const CdoPR_HOME_TELEPHONE_NUMBER = &H3A09001F                                               ' Item.HomeTelephoneNumber
Public Const CdoPR_HOME2_TELEPHONE_NUMBER = &H3A2F001F                                              ' Item.Home2TelephoneNumber
Public Const CdoPR_HOME_FAX_NUMBER = &H3A25001F                                                     ' Item.HomeFaxNumber
Public Const CdoPR_ISDN_NUMBER = &H3A2D001F                                                         ' Item.ISDNNumber
Public Const CdoPR_MOBILE_TELEPHONE_NUMBER = &H3A1C001F                                             ' Item.MobileTelephoneNumber
Public Const CdoPR_OTHER_TELEPHONE_NUMBER = &H3A1F001F                                              ' Item.OtherTelephoneNumber
Public Const CdoPR_PRIMARY_FAX_NUMBER = &H3A23001F                                                  ' Item.OtherFaxNumber
Public Const CdoPR_PAGER_TELEPHONE_NUMBER = &H3A21001F                                              ' Item.PagerNumber
Public Const CdoPR_PRIMARY_TELEPHONE_NUMBER = &H3A1A001F                                            ' Item.PrimaryTelephoneNumber
Public Const CdoPR_RADIO_TELEPHONE_NUMBER = &H3A1D001F                                              ' Item.RadioTelephoneNumber
Public Const CdoPR_TELEX_NUMBER = &H3A2C001F                                                        ' Item.TelexNumber
Public Const CdoPR_TTYTDD_PHONE_NUMBER = &H3A4B001F                                                 ' Item.TTYTDDTelephoneNumber

' Address MAPI property tags
Public Const CdoPR_POSTAL_ADDRESS = &H3A15001F                                                      ' Item.PostalAddress
Public Const CdoPR_HOME_ADDRESS_CITY = &H3A59001E                                                   ' Item.HomeAddressCity
Public Const CdoPR_HOME_ADDRESS_STREET = &H3A5D001E                                                 ' Item.HomeAddressStreet
Public Const CdoPR_HOME_ADDRESS_STATE_OR_PROVINCE = &H3A5C001E                                      ' Item.HomeAddressState
Public Const CdoPR_HOME_ADDRESS_COUNTRY = &H3A5A001E                                                ' Item.HomeAddressCountry
Public Const CdoPR_HOME_ADDRESS_POST_OFFICE_BOX = &H3A5E001E                                        ' Item.HomeAddressPostOfficeBox
Public Const CdoPR_HOME_ADDRESS_POSTAL_CODE = &H3A5B001E                                            ' Item.HomeAddressPostalCode
Public Const CdoPR_OTHER_ADDRESS_CITY = &H3A5F001E                                                  ' Item.OtherAddressCity
Public Const CdoPR_OTHER_ADDRESS_STREET = &H3A63001E                                                ' Item.OtherAddressStreet
Public Const CdoPR_OTHER_ADDRESS_STATE_OR_PROVINCE = &H3A62001E                                     ' Item.OtherAddressState
Public Const CdoPR_OTHER_ADDRESS_COUNTRY = &H3A60001E                                               ' Item.OtherAddressCountry
Public Const CdoPR_OTHER_ADDRESS_POSTAL_CODE = &H3A61001E                                           ' Item.OtherAddressPostalCode
Public Const CdoPR_OTHER_ADDRESS_POST_OFFICE_BOX = &H3A64001E                                       ' Item.OtherAddressPostOfficeBox

' Non-documented address contact property tags
Public Const AMPidTag_HomeAddress = "{0420060000000000C000000000000046}0x801A"                      ' Item.HomeAddress
Public Const AMPidTag_BusinessAddress = "{0420060000000000C000000000000046}0x801B"                  ' Item.BusinessAddress
Public Const AMPidTag_OtherAddress = "{0420060000000000C000000000000046}0x801C"                     ' Item.OtherAddress
Public Const AMPidTag_BusinessAddressCity = "{0420060000000000C000000000000046}0x8046"              ' Item.BusinessAddressCity
Public Const AMPidTag_BusinessAddressStreet = "{0420060000000000C000000000000046}0x8045"            ' Item.BusinessAddressStreet
Public Const AMPidTag_BusinessAddressState = "{0420060000000000C000000000000046}0x8047"             ' Item.BusinessAddressState
Public Const AMPidTag_BusinessAddressCountry = "{0420060000000000C000000000000046}0x8049"           ' Item.BusinessAddressCountry
Public Const AMPidTag_BusinessAddressPostalCode = "{0420060000000000C000000000000046}0x8048"        ' Item.BusinessAddressPostalCode
Public Const ...

read more »

 
 
 

Accessing Contact details through CDO

Post by Chris Hodgen » Fri, 12 Feb 1999 04:00:00


I thought that the property was for the categories field.  

A thought has occurred to me.  I am trying to access contacts that are
stored in a public folder and not in the mailbox contacts folder.  I am
getting the values from MDBView in the following manor:

Login with my profile, Open message store, public folders, open IPM
subtree, drilling down through the folders until I find the one I want,
then selecting the message.  I then take the values from the message
properties.

Are these what I am supposed to be looking at?

Also is the extra value valid for all contacts wherever they are
located?

Chris

                -----Original Message-----
                From:   Siegfried Weber [mailto:i...@cdolive.com]

                Posted At:      10 February 1999 19:47
                Posted To:      applications
                Conversation:   Accessing Contact details through CDO
                Subject:        Re: Accessing Contact details through
CDO

                I'm not sure which field of the contact you are trying
to access but I can't find the prop tag you have mentioned. I'm just
busy writing a sample VB6 app which uses CDO to pull out (at least) all
Outlook contact MAPI properties. Here is a list of all MAPI properties
I've currently figured out.

                Hope that help!
                --
                </Siegfried>

                PS: If the app is finished you'll find it on
http://www.cdolive.com

                ' Name MAPI property tags
                Public Const CdoPR_DISPLAY_NAME = &H3001001F
' Item.FullName
                Public Const CdoPR_TITLE = &H3A17001F
' Item.JobTitle
                Public Const CdoPR_COMPANY_NAME = &H3A16001F
' Item.CompanyName
                Public Const CdoPR_DISPLAY_NAME_PREFIX = &H3A45001E
' Item.Title
                Public Const CdoPR_SURNAME = &H3A11001E
' Item.LastName
                Public Const CdoPR_MIDDLE_NAME = &H3A44001F
' Item.MiddleName
                Public Const CdoPR_GIVEN_NAME = &H3A06001F
' Item.FirstName
                Public Const CdoPR_GENERATION = &H3A05001E
' Item.Suffix
                Public Const CdoPR_BUSINESS_HOME_PAGE = &H3A51001F
' Item.WebPage
                Public Const CdoPR_PERSONAL_HOME_PAGE = &H3A50001F
' Item.PersonalHomePage
                Public Const CdoPR_FTP_SITE = &H3A4C001E
' Item.FTPSite
                Public Const CdoPR_INITIALS = &H3A0A001E
' Item.Initials

                ' Non-documented name contact property tags
                Public Const AMPidTag_FileUnder =
"{0420060000000000C000000000000046}0x8005"                        '
Item.FileAs
                Public Const AMPidTag_CompanyAndFullName =
"{0420060000000000C000000000000046}0x8018"               '
Item.CompanyAndFullName
                Public Const AMPidTag_CompanyLastFirstNoSpace =
"{0420060000000000C000000000000046}0x8032"          '
Item.CompanyLastFirstNoSpace
                Public Const AMPidTag_CompanyLastFirstSpaceOnly =
"{0420060000000000C000000000000046}0x8033"        '
Item.CompanyLastFirstSpaceOnly
                Public Const AMPidTag_FullNameAndCompany =
"{0420060000000000C000000000000046}0x8019"               '
Item.FullNameAndCompany
                Public Const AMPidTag_LastFirstAndSuffix =
"{0420060000000000C000000000000046}0x8036"               '
Item.LastFirstAndSuffix
                Public Const AMPidTag_LastFirstNoSpace =
"{0420060000000000C000000000000046}0x8030"                 '
Item.LastFirstNoSpace
                Public Const AMPidTag_LastFirstNoSpaceCompany =
"{0420060000000000C000000000000046}0x8034"          '
Item.LastFirstNoSpaceCompany
                Public Const AMPidTag_LastFirstSpaceOnly =
"{0420060000000000C000000000000046}0x8031"               '
Item.LastFirstSpaceOnly
                Public Const AMPidTag_LastFirstSpaceOnlyCompany =
"{0420060000000000C000000000000046}0x8035"        '
Item.LastFirstSpaceOnlyCompany
                Public Const AMPidTag_LastNameAndFirstName =
"{0420060000000000C000000000000046}0x8017"             '
Item.LastNameandFirstName

                ' Non-documented e-mail contact property tags
                Public Const AMPidTag_EmailOriginalDisplayName =
"{0420060000000000C000000000000046}0x8084"         '
Item.EMail1DisplayName
                Public Const AMPidTag_EmailAddress =
"{0420060000000000C000000000000046}0x8083"                     '
Item.EMail1Address
                Public Const AMPidTag_EmailAddrType =
"{0420060000000000C000000000000046}0x8082"                    '
Item.EMail1AddressType
                Public Const AMPidTag_EmailAddrEntryID =
"{0420060000000000C000000000000046}0x8085"                 '
Item.EMail1EntryID
                Public Const AMPidTag_Email2OriginalDisplayName =
"{0420060000000000C000000000000046}0x8094"        '
Item.EMail2DisplayName
                Public Const AMPidTag_Email2Address =
"{0420060000000000C000000000000046}0x8093"                    '
Item.EMail2Address
                Public Const AMPidTag_Email2AddrType =
"{0420060000000000C000000000000046}0x8092"                   '
Item.EMail2AddressType
                Public Const AMPidTag_Email2AddrEntryID =
"{0420060000000000C000000000000046}0x8095"                '
Item.EMail2EntryID
                Public Const AMPidTag_Email3OriginalDisplayName =
"{0420060000000000C000000000000046}0x80A4"        '
Item.EMail3DisplayName
                Public Const AMPidTag_Email3Address =
"{0420060000000000C000000000000046}0x80A3"                    '
Item.EMail3Address
                Public Const AMPidTag_Email3AddrType =
"{0420060000000000C000000000000046}0x80A2"                   '
Item.EMail3AddressType
                Public Const AMPidTag_Email3AddrEntryID =
"{0420060000000000C000000000000046}0x80a5"                '
Item.EMail3EntryID

                ' Phone MAPI property tags
                Public Const CdoPR_ASSISTANT_TELEPHONE_NUMBER =
&H3A2E001F                                          '
Item.AssistantTelephoneNumber
                Public Const CdoPR_BUSINESS_TELEPHONE_NUMBER =
&H3A08001F                                           '
Item.BusinessTelephoneNumber
                Public Const CdoPR_BUSINESS2_TELEPHONE_NUMBER =
&H3A1B001F                                          '
Item.Business2TelephoneNumber
                Public Const CdoPR_BUSINESS_FAX_NUMBER = &H3A24001F
' Item.BusinessFaxNumber
                Public Const CdoPR_CALLBACK_TELEPHONE_NUMBER =
&H3A02001F                                           '
Item.CallbackTelephoneNumber
                Public Const CdoPR_CAR_TELEPHONE_NUMBER = &H3A1E001F
' Item.CarTelephoneNumber
                Public Const CdoPR_COMPANY_MAIN_PHONE_NUMBER =
&H3A57001F                                           '
Item.CompanyMainTelephoneNumber
                Public Const CdoPR_HOME_TELEPHONE_NUMBER = &H3A09001F
' Item.HomeTelephoneNumber
                Public Const CdoPR_HOME2_TELEPHONE_NUMBER = &H3A2F001F
' Item.Home2TelephoneNumber
                Public Const CdoPR_HOME_FAX_NUMBER = &H3A25001F
' Item.HomeFaxNumber
                Public Const CdoPR_ISDN_NUMBER = &H3A2D001F
' Item.ISDNNumber
                Public Const CdoPR_MOBILE_TELEPHONE_NUMBER = &H3A1C001F
' Item.MobileTelephoneNumber
                Public Const CdoPR_OTHER_TELEPHONE_NUMBER = &H3A1F001F
' Item.OtherTelephoneNumber
                Public Const CdoPR_PRIMARY_FAX_NUMBER = &H3A23001F
' Item.OtherFaxNumber
                Public Const CdoPR_PAGER_TELEPHONE_NUMBER = &H3A21001F
' Item.PagerNumber
                Public Const CdoPR_PRIMARY_TELEPHONE_NUMBER = &H3A1A001F
' Item.PrimaryTelephoneNumber
                Public Const CdoPR_RADIO_TELEPHONE_NUMBER = &H3A1D001F
' Item.RadioTelephoneNumber
                Public Const CdoPR_TELEX_NUMBER = &H3A2C001F
' Item.TelexNumber
                Public Const CdoPR_TTYTDD_PHONE_NUMBER = &H3A4B001F
' Item.TTYTDDTelephoneNumber

                ' Address MAPI property tags
                Public Const CdoPR_POSTAL_ADDRESS = &H3A15001F
' Item.PostalAddress
                Public Const CdoPR_HOME_ADDRESS_CITY = &H3A59001E
' Item.HomeAddressCity
                Public Const CdoPR_HOME_ADDRESS_STREET = &H3A5D001E
' Item.HomeAddressStreet
                Public Const CdoPR_HOME_ADDRESS_STATE_OR_PROVINCE =
&H3A5C001E                                      ' Item.HomeAddressState
                Public Const CdoPR_HOME_ADDRESS_COUNTRY = &H3A5A001E
' Item.HomeAddressCountry
                Public Const CdoPR_HOME_ADDRESS_POST_OFFICE_BOX =
&H3A5E001E                                        '
Item.HomeAddressPostOfficeBox
                Public Const CdoPR_HOME_ADDRESS_POSTAL_CODE = &H3A5B001E
' Item.HomeAddressPostalCode
                Public Const CdoPR_OTHER_ADDRESS_CITY = &H3A5F001E
' Item.OtherAddressCity
                Public Const CdoPR_OTHER_ADDRESS_STREET = &H3A63001E
' Item.OtherAddressStreet
                Public Const CdoPR_OTHER_ADDRESS_STATE_OR_PROVINCE =
&H3A62001E                                     ' Item.OtherAddressState
                Public Const CdoPR_OTHER_ADDRESS_COUNTRY = &H3A60001E
' Item.OtherAddressCountry
                Public Const CdoPR_OTHER_ADDRESS_POSTAL_CODE =
&H3A61001E                                           '
Item.OtherAddressPostalCode
                Public Const CdoPR_OTHER_ADDRESS_POST_OFFICE_BOX =
&H3A64001E                                       '
Item.OtherAddressPostOfficeBox

                ' Non-documented address contact property tags
                Public Const AMPidTag_HomeAddress =
"{0420060000000000C000000000000046}0x801A"                      '
Item.HomeAddress
                Public Const AMPidTag_BusinessAddress =
"{0420060000000000C000000000000046}0x801B"                  '
Item.BusinessAddress
                Public Const AMPidTag_OtherAddress =
"{0420060000000000C000000000000046}0x801C"                     '
Item.OtherAddress
                Public Const AMPidTag_BusinessAddressCity =
"{0420060000000000C000000000000046}0x8046"              '
Item.BusinessAddressCity
                Public Const AMPidTag_BusinessAddressStreet =
"{0420060000000000C000000000000046}0x8045"            '
Item.BusinessAddressStreet
                Public Const AMPidTag_BusinessAddressState =
"{0420060000000000C000000000000046}0x8047"             '
Item.BusinessAddressState
                Public Const AMPidTag_BusinessAddressCountry =
"{0420060000000000C000000000000046}0x8049"           '
Item.BusinessAddressCountry
                Public Const AMPidTag_BusinessAddressPostalCode =
"{0420060000000000C000000000000046}0x8048"        '
Item.BusinessAddressPostalCode
                Public Const AMPidTag_BusinessAddressPostOfficeBox =
"{0420060000000000C000000000000046}0x804A"     '
Item.BusinessAddressPostOfficeBox

                ' Misc MAPI property tags
                Public Const CdoPR_DEPARTMENT_NAME = &H3A18001F
' Item.Department
                Public Const CdoPR_MANAGER_NAME = &H3A4E001F
' Item.ManagerName
                Public Const CdoPR_OFFICE_LOCATION = &H3A19001F
' Item.Location
                Public Const CdoPR_ASSISTANT = &H3A30001F
' Item.AssistantName
                Public Const CdoPR_PROFESSION = &H3A46001F
' Item.Profession
                Public Const CdoPR_NICKNAME = &H3A4F001F
' Item.NickName
                Public Const CdoPR_BIRTHDAY = &H3A420040
' Item.Birthday
                Public Const CdoPR_SPOUSE_NAME = &H3A48001F
' Item.SpouseName
                Public Const CdoPR_WEDDING_ANNIVERSARY =

...

read more »

 
 
 

Accessing Contact details through CDO

Post by Siegfried Webe » Sat, 13 Feb 1999 04:00:00


As far as I know you can access the categories of an Outlook contact item with CDO by using the CDO objMessage.Categories property.

Using MDBView is the right track but you cannot use the MAPI properties you've figured out directly. If you do that it'll only works on your server and only in that particular folder because Outlook contact/task/journal and appointment items using a combination of a MAPI property set ID and MAPI property tag.

If you use the list I've provided your app will run on all folders and Exchange server without any changes!

HTH

--
</Siegfried>

Chris Hodgens wrote in message <14003C2C6DB4D211959E0010E360FC4E07B...@CSSEXCH.cssl.co.uk>...

>I thought that the property was for the categories field.  

>A thought has occurred to me.  I am trying to access contacts that are
>stored in a public folder and not in the mailbox contacts folder.  I am
>getting the values from MDBView in the following manor:

>Login with my profile, Open message store, public folders, open IPM
>subtree, drilling down through the folders until I find the one I want,
>then selecting the message.  I then take the values from the message
>properties.

>Are these what I am supposed to be looking at?

>Also is the extra value valid for all contacts wherever they are
>located?

>Chris

> -----Original Message-----
> From: Siegfried Weber [mailto:i...@cdolive.com]
> Posted At: 10 February 1999 19:47
> Posted To: applications
> Conversation: Accessing Contact details through CDO
> Subject: Re: Accessing Contact details through
>CDO

> I'm not sure which field of the contact you are trying
>to access but I can't find the prop tag you have mentioned. I'm just
>busy writing a sample VB6 app which uses CDO to pull out (at least) all
>Outlook contact MAPI properties. Here is a list of all MAPI properties
>I've currently figured out.

> Hope that help!
> --
> </Siegfried>

> PS: If the app is finished you'll find it on
>http://www.cdolive.com

> ' Name MAPI property tags
> Public Const CdoPR_DISPLAY_NAME = &H3001001F
>' Item.FullName
> Public Const CdoPR_TITLE = &H3A17001F
>' Item.JobTitle
> Public Const CdoPR_COMPANY_NAME = &H3A16001F
>' Item.CompanyName
> Public Const CdoPR_DISPLAY_NAME_PREFIX = &H3A45001E
>' Item.Title
> Public Const CdoPR_SURNAME = &H3A11001E
>' Item.LastName
> Public Const CdoPR_MIDDLE_NAME = &H3A44001F
>' Item.MiddleName
> Public Const CdoPR_GIVEN_NAME = &H3A06001F
>' Item.FirstName
> Public Const CdoPR_GENERATION = &H3A05001E
>' Item.Suffix
> Public Const CdoPR_BUSINESS_HOME_PAGE = &H3A51001F
>' Item.WebPage
> Public Const CdoPR_PERSONAL_HOME_PAGE = &H3A50001F
>' Item.PersonalHomePage
> Public Const CdoPR_FTP_SITE = &H3A4C001E
>' Item.FTPSite
> Public Const CdoPR_INITIALS = &H3A0A001E
>' Item.Initials

> ' Non-documented name contact property tags
> Public Const AMPidTag_FileUnder =
>"{0420060000000000C000000000000046}0x8005"                        '
>Item.FileAs
> Public Const AMPidTag_CompanyAndFullName =
>"{0420060000000000C000000000000046}0x8018"               '
>Item.CompanyAndFullName
> Public Const AMPidTag_CompanyLastFirstNoSpace =
>"{0420060000000000C000000000000046}0x8032"          '
>Item.CompanyLastFirstNoSpace
> Public Const AMPidTag_CompanyLastFirstSpaceOnly =
>"{0420060000000000C000000000000046}0x8033"        '
>Item.CompanyLastFirstSpaceOnly
> Public Const AMPidTag_FullNameAndCompany =
>"{0420060000000000C000000000000046}0x8019"               '
>Item.FullNameAndCompany
> Public Const AMPidTag_LastFirstAndSuffix =
>"{0420060000000000C000000000000046}0x8036"               '
>Item.LastFirstAndSuffix
> Public Const AMPidTag_LastFirstNoSpace =
>"{0420060000000000C000000000000046}0x8030"                 '
>Item.LastFirstNoSpace
> Public Const AMPidTag_LastFirstNoSpaceCompany =
>"{0420060000000000C000000000000046}0x8034"          '
>Item.LastFirstNoSpaceCompany
> Public Const AMPidTag_LastFirstSpaceOnly =
>"{0420060000000000C000000000000046}0x8031"               '
>Item.LastFirstSpaceOnly
> Public Const AMPidTag_LastFirstSpaceOnlyCompany =
>"{0420060000000000C000000000000046}0x8035"        '
>Item.LastFirstSpaceOnlyCompany
> Public Const AMPidTag_LastNameAndFirstName =
>"{0420060000000000C000000000000046}0x8017"             '
>Item.LastNameandFirstName

> ' Non-documented e-mail contact property tags
> Public Const AMPidTag_EmailOriginalDisplayName =
>"{0420060000000000C000000000000046}0x8084"         '
>Item.EMail1DisplayName
> Public Const AMPidTag_EmailAddress =
>"{0420060000000000C000000000000046}0x8083"                     '
>Item.EMail1Address
> Public Const AMPidTag_EmailAddrType =
>"{0420060000000000C000000000000046}0x8082"                    '
>Item.EMail1AddressType
> Public Const AMPidTag_EmailAddrEntryID =
>"{0420060000000000C000000000000046}0x8085"                 '
>Item.EMail1EntryID
> Public Const AMPidTag_Email2OriginalDisplayName =
>"{0420060000000000C000000000000046}0x8094"        '
>Item.EMail2DisplayName
> Public Const AMPidTag_Email2Address =
>"{0420060000000000C000000000000046}0x8093"                    '
>Item.EMail2Address
> Public Const AMPidTag_Email2AddrType =
>"{0420060000000000C000000000000046}0x8092"                   '
>Item.EMail2AddressType
> Public Const AMPidTag_Email2AddrEntryID =
>"{0420060000000000C000000000000046}0x8095"                '
>Item.EMail2EntryID
> Public Const AMPidTag_Email3OriginalDisplayName =
>"{0420060000000000C000000000000046}0x80A4"        '
>Item.EMail3DisplayName
> Public Const AMPidTag_Email3Address =
>"{0420060000000000C000000000000046}0x80A3"                    '
>Item.EMail3Address
> Public Const AMPidTag_Email3AddrType =
>"{0420060000000000C000000000000046}0x80A2"                   '
>Item.EMail3AddressType
> Public Const AMPidTag_Email3AddrEntryID =
>"{0420060000000000C000000000000046}0x80a5"                '
>Item.EMail3EntryID

> ' Phone MAPI property tags
> Public Const CdoPR_ASSISTANT_TELEPHONE_NUMBER =
>&H3A2E001F                                          '
>Item.AssistantTelephoneNumber
> Public Const CdoPR_BUSINESS_TELEPHONE_NUMBER =
>&H3A08001F                                           '
>Item.BusinessTelephoneNumber
> Public Const CdoPR_BUSINESS2_TELEPHONE_NUMBER =
>&H3A1B001F                                          '
>Item.Business2TelephoneNumber
> Public Const CdoPR_BUSINESS_FAX_NUMBER = &H3A24001F
>' Item.BusinessFaxNumber
> Public Const CdoPR_CALLBACK_TELEPHONE_NUMBER =
>&H3A02001F                                           '
>Item.CallbackTelephoneNumber
> Public Const CdoPR_CAR_TELEPHONE_NUMBER = &H3A1E001F
>' Item.CarTelephoneNumber
> Public Const CdoPR_COMPANY_MAIN_PHONE_NUMBER =
>&H3A57001F                                           '
>Item.CompanyMainTelephoneNumber
> Public Const CdoPR_HOME_TELEPHONE_NUMBER = &H3A09001F
>' Item.HomeTelephoneNumber
> Public Const CdoPR_HOME2_TELEPHONE_NUMBER = &H3A2F001F
>' Item.Home2TelephoneNumber
> Public Const CdoPR_HOME_FAX_NUMBER = &H3A25001F
>' Item.HomeFaxNumber
> Public Const CdoPR_ISDN_NUMBER = &H3A2D001F
>' Item.ISDNNumber
> Public Const CdoPR_MOBILE_TELEPHONE_NUMBER = &H3A1C001F
>' Item.MobileTelephoneNumber
> Public Const CdoPR_OTHER_TELEPHONE_NUMBER = &H3A1F001F
>' Item.OtherTelephoneNumber
> Public Const CdoPR_PRIMARY_FAX_NUMBER = &H3A23001F
>' Item.OtherFaxNumber
> Public Const CdoPR_PAGER_TELEPHONE_NUMBER = &H3A21001F
>' Item.PagerNumber
> Public Const CdoPR_PRIMARY_TELEPHONE_NUMBER = &H3A1A001F
>' Item.PrimaryTelephoneNumber
> Public Const CdoPR_RADIO_TELEPHONE_NUMBER = &H3A1D001F
>' Item.RadioTelephoneNumber
> Public Const CdoPR_TELEX_NUMBER = &H3A2C001F
>' Item.TelexNumber
> Public Const CdoPR_TTYTDD_PHONE_NUMBER = &H3A4B001F
>' Item.TTYTDDTelephoneNumber

> ' Address MAPI property tags
> Public Const CdoPR_POSTAL_ADDRESS = &H3A15001F
>' Item.PostalAddress
> Public Const CdoPR_HOME_ADDRESS_CITY = &H3A59001E
>' Item.HomeAddressCity
> Public Const CdoPR_HOME_ADDRESS_STREET = &H3A5D001E
>' Item.HomeAddressStreet
> Public Const CdoPR_HOME_ADDRESS_STATE_OR_PROVINCE =
>&H3A5C001E                                      ' Item.HomeAddressState
> Public Const CdoPR_HOME_ADDRESS_COUNTRY = &H3A5A001E
>' Item.HomeAddressCountry
> Public Const CdoPR_HOME_ADDRESS_POST_OFFICE_BOX =
>&H3A5E001E                                        '
>Item.HomeAddressPostOfficeBox
> Public Const CdoPR_HOME_ADDRESS_POSTAL_CODE = &H3A5B001E
>' Item.HomeAddressPostalCode
> Public Const CdoPR_OTHER_ADDRESS_CITY = &H3A5F001E
>' Item.OtherAddressCity
> Public Const CdoPR_OTHER_ADDRESS_STREET = &H3A63001E
>' Item.OtherAddressStreet
> Public Const CdoPR_OTHER_ADDRESS_STATE_OR_PROVINCE =
>&H3A62001E                                     ' Item.OtherAddressState
> Public Const CdoPR_OTHER_ADDRESS_COUNTRY = &H3A60001E
>' Item.OtherAddressCountry
> Public Const CdoPR_OTHER_ADDRESS_POSTAL_CODE =
>&H3A61001E                                           '
>Item.OtherAddressPostalCode
> Public Const CdoPR_OTHER_ADDRESS_POST_OFFICE_BOX =
>&H3A64001E                                       '
>Item.OtherAddressPostOfficeBox

> ' Non-documented address contact property tags
> Public Const AMPidTag_HomeAddress =
>"{0420060000000000C000000000000046}0x801A"                      '
>Item.HomeAddress
> Public Const AMPidTag_BusinessAddress =
>"{0420060000000000C000000000000046}0x801B"                  '
>Item.BusinessAddress
> Public Const AMPidTag_OtherAddress =
>"{0420060000000000C000000000000046}0x801C"                     '
>Item.OtherAddress
> Public Const AMPidTag_BusinessAddressCity =
>"{0420060000000000C000000000000046}0x8046"              '
>Item.BusinessAddressCity
> Public Const AMPidTag_BusinessAddressStreet =
>"{0420060000000000C000000000000046}0x8045"            '
>Item.BusinessAddressStreet
> Public Const AMPidTag_BusinessAddressState =
>"{0420060000000000C000000000000046}0x8047"             '
>Item.BusinessAddressState
> Public Const AMPidTag_BusinessAddressCountry =
>"{0420060000000000C000000000000046}0x8049"           '
>Item.BusinessAddressCountry
> Public Const

...

read more »

 
 
 

1. Accessing Contact details through CDO

I am having problems trying to retrieve fields from the contacts form
within exchange with CDO.  I have tried  

        Const ITEM = "{0420060000000000C000000000000046}0x8003"

Set o = objFields(ITEM)

        But I always get a MAPI_E_NOT_FOUND error.  The value for the
field I retrieved using the mdb viewer app.  I am trying to do this
through VB5 and CDO to exchange.

Help.

Chris

2. HTML Mail Interface Question

3. Access "Contacts" in Appointment with CDO

4. Problem with Mailbox Migration Tool from BORK

5. CDO to access Contacts

6. Novell

7. How to access contact table using CDO

8. Deleted emails are not freeing up IS space

9. Delay accessing Contacts folder using CDO - Why?

10. Programatic (CDO) access of Contact subfolders (E2K)

11. Problem with PR_EMS_AB_ASSOC_NT_ACCOUNT / retrieving NT account details from CDO

12. Need help with CDO 1.21 Login (relevant details are included)

13. Problem with PR_EMS_AB_ASSOC_NT_ACCOUNT / retrieving NT account details from CDO