Copy email and or attachments to directory automatically

  • Thread starter Thread starter Tom_H
  • Start date Start date
T

Tom_H

How do you tell Outlook to copy one email to windows
directory like c:\temp\email.msg for example with out
going throught the normal mouse movements?
 
If objItem is the item you want to copy:

objItem.SaveAs "c:\temp\email.msg", 3 ' olMsg = 3
 
This macro will save the currently selected message in the folder to the path and file name specified. You can map this macro to a custom toolbar button so you can run it with just one click.

Sub Test()
Dim objMsg As Object

Set objMsg = Application.ActiveExplorer.Selection.Item(1)
If objMsg Is Nothing Then Exit Sub
objMsg.SaveAs "C:\Temp\test.msg", olMSG
End Sub
 
Back
Top