Group:  Microsoft Outlook ยป microsoft.public.outlook.program_vba
Thread: creating a macro to mark messages for follow-up & assign categorie

Geek News

creating a macro to mark messages for follow-up & assign categorie
Jrod275 12/20/2008 4:57:01 PM
I have assigned several hotkeys which change the category of an email. For
example Ctrl + F1 changes the category to "Test". I also mark the email as
Read and mark the email for follow up.

I do all these thing because I only want to use the Search Folders "For
Follow Up" and "Unread Mail".

So here is want I am trying to do. I want to assign a macro to my toolbar so
that when I click the icon, the selected email(s) will get the following;
- Marked as Unread
- Flagged for Follow Up (No Date)
- and get assigned to a category via the hotkeys, so CTRL+F1

I am use to recording macros, but not building them from scratch. Since
Outlook 2007 do not have a recorder, I am in need of your help.

Here is what I have tried so far (don't laugh).

----------------------
Sub FollowUp()
'
' FollowUp Macro
'
'
Property Set
olCategoryShortcutKeyCtrlF2
OlFlagIcon
olRuleActionMarkRead
End Sub
----------------------
Thanks in advance.


Re: creating a macro to mark messages for follow-up & assign categorie
"Michael Bauer [MVP - Outlook]" <mb[ at ]mvps.org> 12/22/2008 6:42:47 AM

Depending on when you click the toolbar button:

1. The open item is: Application.Session.Activeinspector.CurrentItem

2. One selected item in the folder view is:
Application.Session.ActiveExplorer.Selection(1)

If it's an e-mail (MailItem object), it has a Unread property, which you can
set to True or False, and it has some Flag* properties. The FlagIcon
property determines the color.

In Outlook you can't assign those hotkeys. But you could create some more
toolbar buttons to assign categories. Simply write the name of a category
into the item's Categories property. If there's more than one category, join
them with a semicolon as delimiter.

If you're done, call the item's Save method.

--
Best regards
Michael Bauer - MVP Outlook

: Outlook Categories? Category Manager Is Your Tool
: VBOffice Reporter for Data Analysis & Reporting
: <http://www.vboffice.net/product.html?pub=6&lang=en>


Am Sat, 20 Dec 2008 08:57:01 -0800 schrieb Jrod275:

[Quoted Text]
> I have assigned several hotkeys which change the category of an email. For
> example Ctrl + F1 changes the category to "Test". I also mark the email as
> Read and mark the email for follow up.
>
> I do all these thing because I only want to use the Search Folders "For
> Follow Up" and "Unread Mail".
>
> So here is want I am trying to do. I want to assign a macro to my toolbar
so
> that when I click the icon, the selected email(s) will get the following;
> - Marked as Unread
> - Flagged for Follow Up (No Date)
> - and get assigned to a category via the hotkeys, so CTRL+F1
>
> I am use to recording macros, but not building them from scratch. Since
> Outlook 2007 do not have a recorder, I am in need of your help.
>
> Here is what I have tried so far (don't laugh).
>
> ----------------------
> Sub FollowUp()
> '
> ' FollowUp Macro
> '
> '
> Property Set
> olCategoryShortcutKeyCtrlF2
> OlFlagIcon
> olRuleActionMarkRead
> End Sub
> ----------------------
> Thanks in advance.

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net