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

bruceg113355 at gmail.com bruceg113355 at gmail.com
Mon Jul 23 20:42:15 EDT 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.


Bruce







More information about the Python-list mailing list