Categorize new email

Status
Not open for further replies.

llravlin

Member
Outlook version
Outlook 2007
Email Account
Hi,

Is there a way to check an email after I open it to see if it has a category and if not open the category dialog box? I want this to happen automatically, not by a button. Can this be done using VBA?

Any help is appreciated,

Laura
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
You can use VBA to check for a category as a message is opened and open the category picker dialog if there is no category. I'm not sure it will work if you only use the reading pane.

This event runs when you open a message - it's a PITA IMHO, a close event would be better, but it's not working for me. There is also an open event - http://msdn.microsoft.com/en-us/library/office/ff865989(v=office.14).aspx - but its not doing anything here (same as close event :)).

Code:
Public WithEvents myOlInspectors As Outlook.Inspectors
Public myInspectorsCollection As New Collection

Private Sub Application_Startup()
    Initialize_handler
End Sub

Public Sub Initialize_handler()
    Set myOlInspectors = Application.Inspectors
End Sub

Private Sub myOlInspectors_NewInspector(ByVal Inspector As Outlook.Inspector)
If (Inspector.CurrentItem.Class = olMail) Then

    If Inspector.CurrentItem.Parent = "Inbox" Then
        strCats = Inspector.CurrentItem.Categories

        If strCats = "" Then
            Inspector.CurrentItem.ShowCategoriesDialog
        End If
    End If
End If
End Sub
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
R Categorize Button in Quick Access Toolbar Disappears on New Email Using Outlook 1
acpete48317 Categorize and move Outlook Email Outlook VBA and Custom Forms 2
P Categorize in Calendar not listed under tags in Office 365 (Office 2016) Using Outlook 5
P Automatically Categorize Meetings once they are accepted Outlook VBA and Custom Forms 5
K Maximum Categorize Shortcuts In Outlook 2010? Using Outlook 1
King Mustard Maximum Categorize shortcuts in Outlook 2010? Using Outlook 1
C Auto categorize duplicate subjects Outlook VBA and Custom Forms 11
A Categorize Outgoing Mail Outlook VBA and Custom Forms 3
Diane Poremsky Categorize Messages using Contact Category New Slipstick.com Articles 0
J categorize problem outlook 2010 Using Outlook 3
D categorize tool disabled Using Outlook 7
C How can I customise the list of categories shown in the dropdown list when the [Categorize] button is pressed while adding a new Calendar appointment? Using Outlook 3
W Reply to email Using Outlook 0
F Junk Email does not get added to the Blocked Sender List Using Outlook 0
B disappearing original when attach to email Using Outlook 1
W September 2020 - No Default Email Client message after Office Update Using Outlook 1
glnz O365 - How to combine the Inboxes for four email accounts into a single Inbox Using Outlook 7
glnz O365 - How to send from acct 2 but showing email name from acct 1 as From - alias? Using Outlook 1
S Macro to move “Re:” & “FWD:” email recieved the shared inbox to a subfolder in outlook Outlook VBA and Custom Forms 0
D Move Email with Attachment to Folder Outlook VBA and Custom Forms 3
E Asking user to select multiple options in a list in an email Outlook VBA and Custom Forms 0
K Use VBA to find Sender and Recipient from Microsfot 365 Journaled Email Items Outlook VBA and Custom Forms 3
B Add ComboBox Value to Body of Email Outlook VBA and Custom Forms 1
A Backup Email Accounts On OutLook For Mac 2016 (Microsoft 365 subscription version) Using Outlook 0
F VBA code to dock Styles whenever I write or edit an email Outlook VBA and Custom Forms 0
G Inbox shows old email Using Outlook 3
L Email with correct To address but displaying name of a related person Using Outlook 0
A Two Inboxes, Same Email? Using Outlook 3
B Adding signature to bottom of VBA reply email Outlook VBA and Custom Forms 1
J To delete the draft email Using Outlook 2
B VBScript doesn't run on Recipient Email Outlook VBA and Custom Forms 2
J Autoreply email recieved from specific sender after deleting some text from body. Using Outlook 0
M Outlook 2013 reminder email by using Outlook vba Outlook VBA and Custom Forms 2
D Sending email from Office 365 alias in Outlook Using Outlook 3
S Macro or plug-in to see if specific person was included in this email Outlook VBA and Custom Forms 3
S Body text of Email from invite date/time Outlook VBA and Custom Forms 7
R Outlook 2010 How do you export 2 email Accounts' 2010 Inbox Files to new computer (2019)? Using Outlook 0
R Auto display of new email does not work on non-default account Outlook VBA and Custom Forms 0
J Automatically forward email and apply template Outlook VBA and Custom Forms 0
L Outlook saved email templates Using Outlook 1
B VBA to convert email to task, insert text of email in task notes, and attach copy of original email Outlook VBA and Custom Forms 4
T How can you include Junk Email in Search Results like you can include Deleted Items? Using Outlook 3
B Extracting email addresses from a folder - how to also get the name of the person the address is for? Using Outlook 5
W Replyin to the reply-to email address Outlook VBA and Custom Forms 0
E How to display "Change Folder" in Change Default Email Delivery Location in Exchange Outlook 2016 Using Outlook 1
M Extract all links from Outlook email, send to Excel Using Outlook 2
O Forward a email with modified body Automatically. Outlook VBA and Custom Forms 0
B Outlook 2003 email sending & receiving suddenly stopped working Using Outlook 3
R List folders in a combo box + select folder + move emails from inbox to that folder + reply to that email Outlook VBA and Custom Forms 1
O Email not leaving Outbox when using Excel VBA to sync Outlook account Outlook VBA and Custom Forms 4

Similar threads

Top