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?
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.
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
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.