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
Post a Comment