A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

OL2k7: Macro to flag & categorize message from reading pane



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old June 10th 06, 02:28 PM posted to microsoft.public.outlook.program_vba
Michael D. Adams
external usenet poster
 
Posts: 2
Default OL2k7: Macro to flag & categorize message from reading pane

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.

--
Michael D. Adams -- Windsor, Connecticut -- http://www.triskele.com

Blogs: http://www.triskele.com/actuary (News/commentary)
http://www.triskele.com/highway (Highway features)


Ads
  #2  
Old June 10th 06, 03:35 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default OL2k7: Macro to flag & categorize message from reading pane

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
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Michael D. Adams" wrote in message ...
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.

--
Michael D. Adams -- Windsor, Connecticut -- http://www.triskele.com

Blogs: http://www.triskele.com/actuary (News/commentary)
http://www.triskele.com/highway (Highway features)


  #3  
Old June 10th 06, 06:24 PM posted to microsoft.public.outlook.program_vba
Michael D. Adams
external usenet poster
 
Posts: 2
Default OL2k7: Macro to flag & categorize message from reading pane

"Sue Mosher [MVP-Outlook]" wrote

See http://www.outlookcode.com/codedetail.aspx?id=50


Perfect. Thanks!


--
Michael D. Adams -- Windsor, Connecticut -- http://www.triskele.com

Blogs: http://www.triskele.com/actuary (News/commentary)
http://www.triskele.com/highway (Highway features)


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Reading Pane TerryM Outlook - Installation 1 May 14th 06 01:59 AM
Clear Flag for follow up items macro dim4x4 Outlook and VBA 4 May 5th 06 02:48 PM
Can only see text in Reading Pane Dawn Outlook - Calandaring 0 April 19th 06 05:55 PM
Macro to Flag based on criteria [email protected] Outlook - General Queries 1 March 31st 06 02:04 AM
Forms(One-Off) and Reading Pane Allen Outlook - Using Forms 11 March 28th 06 01:58 AM


All times are GMT +1. The time now is 12:48 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2024 Outlook Banter.
The comments are property of their posters.