Howdy,
I use macros to organise and sort (via search folders) my rather large inbox. I have previously received advice on how to create a macro to assign a single category to an email. I assign the macro to a custom toolbar button and use the combination of categories and flags organise the emails.
It would be really handy to be able assign multiple categories (one after the other rather than multiple via one button), eg ‘category-topic’ and ‘category-file’.
Can anyone help me out with this in VBA code (if not I will need to default to pulling up the category window and assigning multiple categories).
The original code provided was….
—————————————————————
Sub SetCategoryTest()
Dim collSelItems As Collection
Dim lngC As Long
Set collSelItems = GetSelectedItems
If Not collSelItems Is Nothing Then
For lngC = 1 To collSelItems.Count
collSelItems(lngC).Categories = “Test”
collSelItems(lngC).Save
Next lngC
End If
Set collSelItems = Nothing
End Sub
—————————————————————