I wrote the below in an attempt to save emails older than six months in an external folder:
Option Explicit
Public Sub EBS()
Dim oMail As MailItem
Dim sPath As
You would also want to use Items.Find/FindNext or Items.Restrict instead of looping through all items in a folder.
UPDATE:
setItems = oInboxFolder.Items
set RestrictedItems = setItems.Restrict(" ([ReceivedTime ] < '05/02/2014')) AND ([MessageClass] = 'IPM.Note' ")
for I = RestrictedItems.Count to 1 step -1 do
Set oMail = RestrictedItems.Item(I)
next