Archiving outlook emails, gmail style

archive
In Nakheel we have a maximum email quota which gets filled up pretty quickly if you receive large attachements, such as presentations, manuals and silly movies. I wanted to build a macro that imitates Gmail awesome archiving method.

Based on the lifehackers’s article, my version had to move the my selected mails to a PST file on my disk, freeing up space on my “online mailbox”.

I won’t repeat how to make the macro and all, the lifehacker’s article does a very good job in that. I just made a few changes to the code, and that is below:

Sub Archive()
  pst_file = "C:\Backup\archived.pst"
  Set ns = Application.GetNamespace("MAPI")
  ns.AddStore (pst_file)
  Set ArchiveFolder = ns.Folders("archived")

  For Each Msg In ActiveExplorer.Selection
    Msg.Move ArchiveFolder
  Next Msg
End Sub

Leave a Reply

Your email address will not be published. Required fields are marked *