I have a macro that reads the subject line of an email, finds the UID and copies it to the clipboard. I then search Outlook for the UID and highlight certain emails. I want to send them all to a folder.
I have the loop and move worked out, but it only moves the active/selected email. How do I have move all of the highlighted emails and not just the selected email?
Select Case Outlook.Application.ActiveWindow.Class
Case olInspector
Set myItem = ActiveInspector.CurrentItem
Case olExplorer
Set myItem = Application.ActiveExplorer.Selection.Item(1)
End Select
myItem.Move objNS.GetDefaultFolder(olFolderInbox).Folders(strSubFolder1)
I'm using the terms "active" and "selected" interchangeably which may be inaccurate. By active or selected I mean the email that is being displayed in the reading pane.