OL2k7: Macro to flag & categorize message from reading pane

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.
 
S

Sue Mosher [MVP-Outlook]

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top