Save and delete message and attachment

P

PJFry

I want to save certain messages with the attachments to a folder (on an
external drive) and the delete the message and attachment from my inbox. I
will select the messages on a case-by-case basis.

How can I do this?

Thanks!
PJ
 
D

Dmitry Streblechenko

set Selection = Application.ActiveExplorer.Selection
for i = Selection.Count to 1 step-1
set Msg = Selection.Item(i)
Msg.SaveAs "c:\temp\somemessage.msg", olMsg
Msg.Delete
next

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top