On Mon, Jul 23, 2012 at 12:33 PM, <bruceg113...@gmail.com> wrote: > I tried something similar to the example at > http://stackoverflow.com/questions/4312687/how-to-embed-images-in-email . > > Problem is, this line is not understood: > mail.BodyFormat = OlBodyFormat.olFormatHTML > > Traceback (most recent call last): > ... > appt.BodyFormat = OlBodyFormat.olFormatHTML > NameError: name 'OlBodyFormat' is not defined
Assuming you've run makepy to generate the static dispatch Python module for the Outlook type library, all generated constants are available via win32com.client.constants Try: appt.BodyFormat = win32com.client.constants.olFormatHTML -- http://mail.python.org/mailman/listinfo/python-list