Jon von der Heyden
MrExcel MVP, Moderator
- Joined
- Apr 6, 2004
- Messages
- 10,907
- Office Version
- 365
- Platform
- Windows
Hi All
Snippet from my Outlook VBA:
If I select multiple mail items, while it does appear to loop all items (the debug print correctly reveals each item, and the string value is the same for each item), it doesn't apply strCats to the mail item categories property for any but the first item.
Any idea why?
Regards
Jon
Snippet from my Outlook VBA:
VBA Code:
If .optCategorize.Value Then
For Each varItem In ActiveExplorer.Selection
If TypeName(varItem) = "MailItem" Then
'Debug.Print varItem.Subject, strCats
varItem.Categories = strCats
End If
Next varItem
End If
If I select multiple mail items, while it does appear to loop all items (the debug print correctly reveals each item, and the string value is the same for each item), it doesn't apply strCats to the mail item categories property for any but the first item.
Any idea why?
Regards
Jon