I have a vba command set to a button on the top left of Outlook. This button moved all my read mail into my reviewed folder. However, I don't want to have to click the button every time I read a mail.
Is there a way I can automate that button, and if so, How?
Sub MoveInbox2Reviewed()
On Error Resume Next
Set oOutlook = CreateObject("Outlook.Application")
Set oNamespace = oOutlook.GetNamespace("MAPI")
Set oFolderSrc = oNamespace.GetDefaultFolder(olFolderInbox)
Set oFolderDst = oFolderSrc.Folders("Reviewed")
Set oFilteredItems = oFolderSrc.Items.Restrict("[UnRead] = False")
For Each oMessage In oFilteredItems
oMessage.Move oFolderDst
Next
End Sub