VBA outlook SaveAs .msg without it opening as Draft -


why code on link below save email draft? when open saved email opens ready send email instead of msg file object (like when copy/paste email desktop open it). i'd similar result when copy/paste email doesn't open ready send email; can please let me know how this? in advance provided!

outlook vba macro saving emails copies in local folder

from tests seems .saveas works fine selected emails, because email part of applicaiton_itemsend event it's still in draft format...

because time application.itemsend event fires, message still in unsent (draft) mode. erliest can access message in sent state, when items.itemadd event fires on sent items folder. bonus, message contain sender related information.

if still need use application.itemsend event, can make appear sent using extended mapi (c++ or delphi only) or redemption (any language). normally, message can marked sent before saved first time (mapi limitation), restriction doe not apply standalone msg files. in redemption (off top of head):

set session = createobject("redemption.rdosession") session.mapiobject = application.session.mapiobject set item = session.getmessagefrommsgfile("c:\temp\test.msg") item.sent = true item.save 

Comments

Popular posts from this blog

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -

minify - Minimizing css files -