Become a Columnist Microsoft Exchange Site Microsoft Support SiteMSDN Exchange Site

       How did you like this article? Please vote and let us know.          

Subscribe to OutlookExchange
Anderson Patricio
Ann Mc Donough
Bob Spurzem
Brian Veal
Catherine Creary
Cherry Beado
Colin Janssen
Collins Timothy Mutesaria
Drew Nicholson
Fred Volking
Glen Scales
Goran Husman
Guy Thomas
Henrik Walther
Jason Sherry
Jayme Bowers
John Young
Joyce Tang
Justin Braun
Konstantin Zheludev
Kristina Waters
Kuang Zhang
Mahmoud Magdy
Martin Tuip
Michael Dong
Michele Deo
Mitch Tulloch
Nicolas Blank
Pavel Nagaev
Ragnar Harper
Ricardo Silva
Richard Wakeman
Russ Iuliano
Santhosh Hanumanthappa
Shannal L. Thomas
Steve Bryant
Steve Craig
Todd Walker
Tracey J. Rosenblath

 

 
 

Access Contact fields using Collaboration Data Objects

 

Anyone trying to read Contact Items with CDO 1.2 will quickly discover that contacts are not directly supported in this release, but that you can get the properties you need by using the field schema. There are a couple of "magic" bullets you need to get at the Email fields (i.e. Email1AddrType, Email1Address, etc.). Specifically, you need a GUID that represents the MAPI PropertySetId and a PropertyTag for the field.

strItemGUID = "{0420060000000000C000000000000046}" 'propertysetid for many of the Contact fields.

ptag_EMAIL_TYPE = "0x8082"
ptag_EMAIL_ADDRESS = "0x8083"

Set colFields = myContact.Fields
Set myAddrType = colFields(strItemGUID & ptag_EMAIL_TYPE)
Set myAddress = colFields(strItemGUID & ptag_EMAIL_ADDRESS)

That's all there is to it. As usual, it's easy once you know how...

Here are a few more PropertyTags for anyone who is interested.

Email1Address 0x8083
Email1AddressType 0x8082
Email1DisplayName 0x8080
Email1EntryID 0x8085
Email2Address 0x8093
Email2AddressType 0x8092
Email2DisplayName 0x8090
Email2EntryID 0x8095
Email3Address 0x80A3
Email3AddressType 0x80A2
Email3DisplayName 0x80A0
Email3EntryID 0x80A5

Hope this helps.

john k
--
John Kesler, MCSD
K-Smart Solutions

Email at: johnk@ksmart.com

 


Disclaimer: Your use of the information contained in these pages is at your sole risk. All information on these pages is provided "as is", without any warranty, whether express or implied, of its accuracy, completeness, fitness for a particular purpose, title or non-infringement, and none of the third-party products or information mentioned in the work are authored, recommended, supported or guaranteed by Pro Exchange. OutlookExchange.Com and Pro Exchange shall not be liable for any damages you may sustain by using this information, whether direct, indirect, special, incidental or consequential, even if it has been advised of the possibility of such damages.

© Copyright Pro Exchange, Inc., 2006