
ian.g.kelly at gmail
Jul 23, 2012, 1:32 PM
Post #5 of 10
(616 views)
Permalink
|
|
Re: Python and Outlook, sendinf an image in the body of email
[In reply to]
|
|
On Mon, Jul 23, 2012 at 12:33 PM, <bruceg113355 [at] gmail> 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
|