outlook vba - Saving "Device Independent Bitmap" attachment -


how save kind of attachment (from signed message)? saved .saveasfile method, without extension , no application can open it.

set outitem = application.activeexplorer.selection.item(1)  each att in outitem.attachments     att.saveasfile "c:\temp\" & att.displayname next 

for olole attachments, need open attachment istorage com object , extract data (which can mangled) 1 of streams inside storage - can see data in outlookspy: select message, click imessage button on outlookspy ribbon, go getattachmenttable tab, double click on 1 of attachments. select pr)_attach_data_obj property, right click, imapiprop::openproperty, select iid_istorage. data cannot accessed in vba using outlook object model

if using redemption option, rdoattachment.saveasfile method smart enough extract bmp, emf, pdf, excel, etc. file data storage. following (off top of head) should job:

  set session = createobject("redemption.rdosession")   session.mapiobject = application.session.mapiobject   set rmsg = session.getrdoobjectfromoutlookobject(application.activeexplorer.selection.item(1))   each att in rmsg.attachments     att.saveasfile "c:\temp\" & att.filename   next 

Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -