OL2k7: Macro to flag & categorize message from reading pane

  • Thread starter Thread starter Michael D. Adams
  • Start date Start date
M

Michael D. Adams

I'm running OL12B2. Under OL11, when reading messages, I would flag
messages for followup, using different colored flags to categorize the
messages, and customizing my toolbars to get me one-click access to
those different flags.

Flag functionality appears to have changed in OL12, and my old colored
flags on the toolbar no longer work.

I'm trying to create macros that reproduce the functionality I lost.
The following macro works when I actually open a message:

Sub Red()
Set insp = Application.ActiveInspector
If Not insp Is Nothing Then
Set objMail = insp.CurrentItem
objMail.Categories = "Red-Category"
objMail.MarkAsTask (4)
End If
End Sub

....but the if loop isn't triggered if I try to run the macro when
viewing a message through the reading pane.

How can I adapt this macro to run when called while viewing a message
from the reading pane?

Thanks.
 
A message selected in the folder view is Application.ActiveExplorer.Selection(1). See http://www.outlookcode.com/codedetail.aspx?id=50 for a GetCurrentItem() function that allows you to write a single macro to work with both Explorer and Inspector windows.

Also, don't forget to save the item if you're in an Explorer.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Back
Top