Created
December 20, 2016 12:55
-
-
Save alatas/2b562e9f19e2909f746fa25431db7cf6 to your computer and use it in GitHub Desktop.
auto clear categories on new email / Outlook
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Private Sub Application_NewMailEx(ByVal EntryIDCollection As String) | |
Dim objNS As Outlook.NameSpace | |
Dim objEmail As Outlook.MailItem | |
Dim strIDs() As String | |
Dim intX As Integer | |
strIDs = Split(EntryIDCollection, ",") | |
For intX = 0 To UBound(strIDs) | |
Set objNS = Application.GetNamespace("MAPI") | |
Set objEmail = objNS.GetItemFromID(strIDs(intX)) | |
objEmail.Categories = "" | |
objEmail.Save | |
Next | |
Set objEmail = Nothing | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment