When certain emails arrive, I want to set their category and move them to a specific folder. The following code sets the category successfully, but does not move it to the folder.
(FWIW: The "Alerts" folder is not a subfolder - it is a peer with the InBox)
What am I missing?
Public Sub MoveToFolder(MyEmail As Outlook.MailItem)
Dim MyNamespace As Outlook.NameSpace
Dim DestFolder As Outlook.MAPIFolder
Set MyOutlook = Outlook.Application
Set MyNamespace = MyOutlook.GetNamespace("MAPI")
Set DestFolder = MyNamespace.Folders("Firstname.Lastname@website.com").Folders("Alerts")
MyEmail.Categories = "Problem Report"