[python-win32] Problem in accessing the Message body of Outlook Inbox.

Tim Roberts timr at probo.com
Fri Oct 10 18:20:15 CEST 2008


venu madhav wrote:
>
> Here is the code:
>
> rom win32com.client import Dispatch
>
> session = Dispatch("MAPI.session")
> session.Logon('outlook')  # MAPI profile name
> inbox = session.Inbox
> for i in range(inbox.Messages.Count):
>     message = inbox.Messages.Item(i + 1)
>     f.write(message.Subject+"\n\n")
>     f.write(message.Body+"\n\n\n")
>
>                   Hope you could get some idea based on this..

I believe you want the "Text" property, not the "Body" property.

-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the python-win32 mailing list