vba - Can I create and add a text attachment to an Outlook message that is no file? -


i trying create outlook macro forward incoming message attachment contains particular piece of text.

it should plain text file attachment, created on fly.

attachments.add supports adding items of type olembeddeditem, the documentation says must messages; code examples found elsewhere have them appointments or contacts, can't find lets them pieces of plain text can viewed , saved files.

a workaround create attachment plain text file on disk , attach file, brittle. there way avoid that?

no, outlook object model lets pass file name olbyvalue attachments. extended mapi (c++ or delphi) oom based on not deal files @ - 1 need open pr_attach_data_bin property istream , populate stream data want. if c++ or delphi not option, redemption allows pass variant array of byte rdomail.attachments.add (you can set attachment.filename property later).


Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -