
peter.n.green at gmail
Nov 5, 2009, 8:13 AM
Post #1 of 1
(42 views)
Permalink
|
|
Differentiating file attachments from inline attachments in Exchange
|
|
I am trying to write some code that will scan an Exchange 2003 mailbox, detach file attachments from messages into the file system and replace them in the message with links. My initial attempt is based on Tim Golden's approach at http://timgolden.me.uk/python/win32_how_do_i/replace-outlook-attachments-with-links.html, using CDO. A typical message may contain AutoCAD drawings, PDFs, site photographs and Excel spreadsheet schedules as separate file attachments, together with inline graphics such as a corporate logo in the signature. The problem is that iterating over the message attachments using CDO detaches *everything*. I want to leave the inline images in the message body. I've looked at the CDO documentation and cannot see any property that distinguishes inline images from file attachments. I suspect I am barking up the wrong tree and need to be automating Outlook instead, but if so, any suggestions as to how I can achieve what I want? I imagine Content-Disposition Headers are going to be involved somehow... Thanks in advance, Peter -- http://mail.python.org/mailman/listinfo/python-list
|