Hi Diane, the issue that Outlook will forget, is that in case I set it up to run once a day? I'm not really following. Could you clarify?
I tried this macro but changed the folder names to match the exact folders in my Outlook + changed the if category is done to if flagstatus is complete because it's the emails that are flagged as complete that should be moved. I'm not sure I did this correctly. I thought so, but it's not working... I put it in ThisOutlookSession and ran it but nothing happened. Could you possibly check if something is wrong?
Thank you so much for your help, I really appreciate it.
Private WithEvents OInbox As Outlook.Folder
Private WithEvents fldDone As Outlook.Folder
Public WithEvents OlItems As Outlook.Items
Public WithEvents olProcess As Outlook.Items
Public WithEvents olFollowUp As Outlook.Items
Public WithEvents olCCMail As Outlook.Items
Public WithEvents olOnHold As Outlook.Items
Public Sub Initialize_handler()
Dim NS As Outlook.NameSpace
Set NS = Application.GetNamespace("MAPI")
Set OInbox = NS.GetDefaultFolder(olFolderInbox)
Set OlItems = OInbox.Items
Set fldDone = OInbox.Folders("08 DONE")
'subfolders of inbox
Set olProcess = OInbox.Folders("02 PROCESSING ST").Items
Set olFollowUp = OInbox.Folders("06 FOLLOW UP").Items
Set olCCMail = OInbox.Folders("03 CC MAIL").Items
Set olOnHold = OInbox.Folders("04 ON HOLD ST").Items
End Sub
Private Sub OlItems_ItemChange(ByVal Item As Object)
MoveDoneMessages Item
End Sub
Private Sub olProcess_ItemChange(ByVal Item As Object)
MoveDoneMessages Item
End Sub
Private Sub olFollowUp_ItemChange(ByVal Item As Object)
MoveDoneMessages Item
End Sub
Private Sub olCCMail_ItemChange(ByVal Item As Object)
MoveDoneMessages Item
End Sub
Private Sub olOnHold_ItemChange(ByVal Item As Object)
MoveDoneMessages Item
End Sub
Private Sub MoveDoneMessages(ByVal Item As Object)
If Item.FlagStatus = olFlagComplete Then
Item.Move fldDone
End If
End Sub