Outlook/Exchange CDO/COM questions

Mark Hammond mhammond at skippinet.com.au
Wed Jan 15 18:09:21 EST 2003


John Taylor wrote:
> I have 3 questions about the code that I am writing (posted below).
> 
> 1) This code works on Inbox, but I really need it to work on the "Sent
> Items" folder, but can not figure this out.

folder = outlook.Session.GetDefaultFolder(constants.olFolderSentMail)

should open it for you.

> 2) Iterating through Recipients returns all names listed in the "To:"
> header, how do I also get "CC:"?

Each recipient object has a "Type" property that may be one of OlTo, 
olCC, etc

> 3) Some of the text is unicode, but it is probably just a few
> characters.  How do I print out unicode text, in the info() function. 
> I imagine this is utf-16, since this is Microsoft.

It depends on where you want to print it.

In many cases, 'print unicode_value.encode("mbcs", "replace")' will 
print something reasonable without failiing with Unicode errors.

Mark.





More information about the Python-list mailing list