Assign categories to outgoing emails

Dommmm

New Member
Outlook version
Outlook 2019 64-bit
Email Account
IMAP
Hi Diane,
I'm trying to add use a macro that when pressed via a button on the ribbon will add a category to the new/outgoing email.
If I start a new email the macro works fine to add the category but as soon as I hit send it seems to be removed and it goes without the category on.

The reason for doing this is I need all outgoing emails delayed by 1 minute except if they have a set category.

So I've got this set up as an outlook rule:
Apply this rule after I send the message
defer delivery by 1 minutes
except if assigned to SEND-OVERRIDE category


and the VBA I have is:

Sub SpecifyCategoryforNewEmail()
Dim obApp As Object
Dim NewEmail As MailItem

Set obApp = Outlook.Application
Set NewEmail = obApp.ActiveInspector.CurrentItem

NewEmail.Categories = "SEND-OVERRIDE"

Set obApp = Nothing
Set NewEmail = Nothing
End Sub

but what happens is the email sits in the outbox, having removed the category and delays by 1 minute. What am I doing wrong please?
 
Top