Hi all, this might not be the best place, but I've gotten other good answers so I hope you all don't mind helping out.
I'm trying to set up an Outlook macro to mark emails as a certain category, but my current macro will only do one at a time. If I select more than one, it will only change the category on the first one I selected and ignore the others. Would someone mind looking through the code and seeing if the answer to this problem is obvious?
Sub mQuote()
Dim App As New outlook.Application
Dim exp As outlook.Explorer
Dim sel As outlook.Selection
Dim cnt As Integer
Set exp = App.ActiveExplorer
Set sel = exp.Selection
For cnt = 1 To sel.Count
sel.Item(cnt).UnRead = False
sel.Item(cnt).Categories = "Quote"
Next
End Sub
I'm trying to set up an Outlook macro to mark emails as a certain category, but my current macro will only do one at a time. If I select more than one, it will only change the category on the first one I selected and ignore the others. Would someone mind looking through the code and seeing if the answer to this problem is obvious?
Sub mQuote()
Dim App As New outlook.Application
Dim exp As outlook.Explorer
Dim sel As outlook.Selection
Dim cnt As Integer
Set exp = App.ActiveExplorer
Set sel = exp.Selection
For cnt = 1 To sel.Count
sel.Item(cnt).UnRead = False
sel.Item(cnt).Categories = "Quote"
Next
End Sub