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 Using Outlook 0
J categorize problem outlook 2010 Using Outlook 3
N Save Selected Email Message as .msg File Outlook VBA and Custom Forms 10
HarvMan Toggle between calendar and email in Outlook 365 Using Outlook 2
F Email being marked as Spam by Gmail and not being visible in Outlook Using Outlook 3
G Email time stamp Using Outlook 2
G Schedule recurring email and attachments display Outlook VBA and Custom Forms 3
G Save and Rename Outlook Email Attachments Outlook VBA and Custom Forms 0
B Need to Copy an email to a subfolder Outlook VBA and Custom Forms 2
M How to setup outlook after importing old account information - Entering email account info creates with "(1)" after the account! Using Outlook 1
K Multiple Rules on Single Email Using Outlook 2
F VBA to move email from Non Default folder to Sub folders as per details given in excel file Outlook VBA and Custom Forms 9
e_a_g_l_e_p_i Outlook 2010 How to set default email address for website links Using Outlook 3
O Same email address, same person, names in so many ways Using Outlook 4
D Create new email from the received Email Body with attachment Outlook VBA and Custom Forms 10
D Outlook launch email showing new unread email in reading pane Using Outlook 11
B Zoom automatically next email item (VBA) Outlook VBA and Custom Forms 2
K Outlook adds space to rows in HTML email signatures viewed on mobile Using Outlook 1
M HTML email signature in Outlook Using Outlook 1
M Respond to Outlook Email Outlook VBA and Custom Forms 0
U Outlook locking up when replying to Email Using Outlook 7
S Email Generated from another program and then edited sends original email. Using Outlook 2
G Forward email body to other mail list directly from Exchange server Exchange Server Administration 1
S Unable to extract text from an Outlook email message Using Outlook 2
T Original email text not shown when replying or forwarding the email. Using Outlook 6
H Search Email Header for Content Type Outlook VBA and Custom Forms 1
A VBA Script - Print Date between first email in Category X and last email in Category Y Outlook VBA and Custom Forms 3
R Problem moving file “Email folders.pst” to new PC Using Outlook 5
P Sending email from outlook IMAP to GMAIL where embedded images are added as attachment Using Outlook 1
D auto forward base on email address in body email Outlook VBA and Custom Forms 0
P How did hacker cause link to delete and archive containing email? Using Outlook 6
I 'quote marks' around email name Using Outlook 1
N contact list seen in Contact folder but knot in Address book or when 'TO' button is clicked in new email Using Outlook 0
T Junk Email does not get added to the Blocked Sender List Using Outlook 0
P i-Phone 6s Plus receiving 2 notifications from Outlook email Using Outlook 1
C WARNING - DO NOT USE AN OUTLOOK.COM ADDRESS FOR GOOGLE ACCOUNT RECOVERY EMAIL Using Outlook 10
T Why is every new email pinned (to keep it on top)? Windows 10 Using Outlook 6
M Outlook, send to > mail recipient - results in plain text email Using Outlook 1
P Can I create a Rule that sends me an email when I get a Task? Using Outlook 3
M Issue transferring Outlook 2016 email accounts & settings onto new computer Using Outlook 8
R Auto Assign Category colours to Incoming Emails based on whom the email is addressed Outlook VBA and Custom Forms 3
S Outlook email to configure setup for each mail Outlook VBA and Custom Forms 1

Similar threads

Top