[python-win32] GUIDs and Microsoft Property sets in Exchange

Aaron Patrick Lehmann lehmanap at cs.purdue.edu
Mon Jan 19 16:35:57 EST 2004


For anyone interested I figured out the solution.  It appears there are two
ways to get at a contact's address in CDO.  The way I started out using is
the AddressLists member in the Session object.  This will get you all
contacts, listed once for each e-mail.  The other way is through the
GetDefaultFolder() method, supplying a parameter of 5, which is the
constant that indicates a contact folder.  This will ultimately get you to
a Messages collection, where each message represents a contact.  Then, you
can add to the standard MAPI fields there, as well as access other Property
Sets if you have the right ID.  www.cdolive.com/cdo5.htm has a fairly
decent rundown of how to do what I wanted in VB, if you search the page for
CdoPropSetID your browser will jump to the right part of the page.  In
Python, I found an easier way was to create a new AddressEntry with just a
name through the <Session>.AddressLists("Contacts").AddressEntries field,
then look up the equivalent message in the
<Session>.GetDefaultFolder(5).Messages field to customize it.

Thanks all,

Aaron Lehmann

On Mon, Jan 19, 2004 at 09:55:44AM -0000, Tim Golden wrote:
> >From: Aaron Patrick Lehmann [mailto:lehmanap at cs.purdue.edu]
> >
> >I'm writing an electronic secretary program for the Computer Science
> >department here, and I've hit a snag regarding contacts with multiple
> >e-mails.
> >
> [... snip explanation of problem ...]
> >
> >Has anyone here done the sort of thing I'm talking about?  Any 
> >suggestions
> >about how to go about doing this?
> 
> I realise that this isn't quite what you were asking for, but
>  I have found this book to be *extremely* useful when doing work
>  on the Outlook / Exchange front:
> 
> http://safari.oreilly.com/?XmlId=1-56592-665-X
> 
> This is the Safari reference. If you don't use Safari (and I
>  wholeheartedly recommend it) then I'm sure you can find the
>  book to buy somewhere.
> 
> HTH
> TJG
> 
> 
> ________________________________________________________________________
> This e-mail has been scanned for all viruses by Star Internet. The
> service is powered by MessageLabs. For more information on a proactive
> anti-virus service working around the clock, around the globe, visit:
> http://www.star.net.uk
> ________________________________________________________________________

-- 
Old hold for new construction.  --Gene Ray www.timecube.com




More information about the Python-win32 mailing list