Python and Outlook, sendinf an image in the body of email

bruceg113355 at bruceg113355 at
Tue Jul 24 02:42:15 CEST 2012

This assignment works:
  import win32com.client
  oOutlook = win32com.client.Dispatch("Outlook.Application")
  appt = oOutlook.CreateItem(0)
  appt.BodyFormat = win32com.client.constants.olFormatHTML 

But this assignment does not work:
  import win32com.client
  oOutlook = win32com.client.Dispatch("Outlook.Application"
  appt = oOutlook.CreateItem(1)  #appointment
  appt.BodyFormat = win32com.client.constants.olFormatHTML 

      AttributeError: ... object has no attribute 'BodyFormat'

It simply appears an Appointment Item does not support .BodyFormat
Images are delivered as attachments, can not be in the body (inline) of the appointment email.


More information about the Python-list mailing list