Macro for moving emails to a particular folder

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have an email folder called "filing cabinet". I want to write a macro that
when run, will simply move a selected email in my Inbox to the "filing
cabinet". Could someone please help me with the code?
Many thanks in advance.
 
Am Sun, 1 Oct 2006 14:08:02 -0700 schrieb Gr6au:

Here´s a sample for the case that the target folder is a subfolder of the
Inbox:

Dim Inbox as Outlook.MapiFolde
Dim Target as Outlook.MapiFolder

Set Inbox=Application.Session.GetDefaultfolder(olFolderInbox)
Set Target=Inbox.Folders("sample")

Application.ActiveExplorer.Selection(1).Move Target
 
Back
Top