Apply a category to item in inbox view

Status
Not open for further replies.
R

RFN0cm9uZw

OK, here is what I am trying to do. I have used the flags to categorize

emails and set up some icons on a toolbar that I can click on and it applies

the flag color to the email while the email is in the inbox view, the place I

see the subject, from, received by on a line for each message in my inbox.

This has worked fine, but now I want to apply the same idea but I want to

apply a category to the email instead of a flag. I have used some code that

allows me to open the email and apply this category, but I want this macro to

apply the category with out the need of opening the email in a new window.

I tried this code:

dim objMail as outlook.mailitem

set objMail=application.activeinspector.selection(1)

with objMail

> categories = "category name"

> save

end with

what works when the email is open in it own window is this:

dim objMail as outlook.mailitem

set objMail=application.activeinspector.currentitem

with objMail

> categories = "category name"

> save

end with

Does anyone know of way to accomplish what I have listed here? Has anyone

ever done something similar?? Please help.

David
 
S

Sue Mosher [MVP]

The object browser (F2 in VBA). Use it to look up Selection, and you should

see that it's a property of ActiveExplorer, not ActiveInspector.

Sue Mosher

"DStrong" <DStrong> wrote in message

news:3EB958D7-B3B4-4E7D-9932-2DF97A932149@microsoft.com...
> OK, here is what I am trying to do. I have used the flags to categorize
> emails and set up some icons on a toolbar that I can click on and it
> applies
> the flag color to the email while the email is in the inbox view, the
> place I
> see the subject, from, received by on a line for each message in my inbox.
> This has worked fine, but now I want to apply the same idea but I want to
> apply a category to the email instead of a flag. I have used some code
> that
> allows me to open the email and apply this category, but I want this macro
> to
> apply the category with out the need of opening the email in a new window.

> I tried this code:

> dim objMail as outlook.mailitem
> set objMail=application.activeinspector.selection(1)
> with objMail
> .categories = "category name"
> .save
> end with

> what works when the email is open in it own window is this:

> dim objMail as outlook.mailitem
> set objMail=application.activeinspector.currentitem
> with objMail
> .categories = "category name"
> .save
> end with

> Does anyone know of way to accomplish what I have listed here? Has anyone
> ever done something similar?? Please help.
> > David
>
 
Status
Not open for further replies.
Thread starter Similar threads Forum Replies Date
C Apply Category Color for Appointment Background Color Calendar Printing Assistant 2
J Automatically forward email and apply template Outlook VBA and Custom Forms 0
O How to apply view settings on all accounts and folders Using Outlook 7
E Apply customized Business Card for all users Outlook VBA and Custom Forms 0
Diane Poremsky Use Word Macro to Apply Formatting to Email New Slipstick.com Articles 0
G how can Apply User-defined Field to all Sub Folder and Other Using Outlook 14
Diane Poremsky Apply Outlook Stationery to Replies and Forwards New Slipstick.com Articles 0
A Can i apply mail rules to inbox sub folders using VBA Outlook VBA and Custom Forms 2
B Apply two rules on one email Using Outlook 2
R Rules - apply to messages > n days old Using Outlook 2
B Unable to apply rule on Exchange server functional account Exchange Server Administration 1
M Apply different views to calendars Using Outlook 0
F Apply Follow up flag ONLY to the people cc'd. Using Outlook 1
T Is there a way to apply a macro before a signature is applied in email? Using Outlook 1
K Why doesn't a rule apply to a friendly name? Using Outlook 2
L Unable to apply SP1 to Exchange 2010 Exchange Server Administration 5
R Apply New Rule Deletes Sent Items Using Outlook 1
L Can't apply ADM policies to Outlook 2007 and Outlook 2010 Using Outlook 7
L Can't apply ADM policies to Outlook 2007 and Outlook 2010 Using Outlook 1
T -basefolderonly still apply when creating a new retention policy in Exchange 2010/sp1? Exchange Server Administration 6
B How to apply filter when printing a view in contacts Using Outlook 3
T Outlook 2003 - View Filter apply by default on new mailbox folder Using Outlook 2
B Email Policy undewr Organization Configuration does not apply as it should Exchange Server Administration 6
O How to set view and apply to all? Using Outlook 2
H Create/Apply auto formatting rules by VB? Outlook VBA and Custom Forms 2
bhamberg Contacts in a category Outlook VBA and Custom Forms 11
K Custom Category Colors Using Outlook 2
4 Macro to set the category of Deleted Item? Outlook VBA and Custom Forms 2
K Update Appointment category when changed in Excel Using Outlook 3
soadfan assign category (VBA) Using Outlook 7
J Automatic color category according to variable domains Outlook VBA and Custom Forms 4
Diane Poremsky Category Color doesn't Display in Inbox New Slipstick.com Articles 0
Wolfkc Unwanted Category "Starred in Android" Using Outlook 6
M receive mail when appointment category changes and create task from appointment Outlook VBA and Custom Forms 0
N VBA Outlook reference to Excel and assigning category Outlook VBA and Custom Forms 13
A recover contact category assignments Using Outlook 4
A Grouping emails using "From" causes a None Category Using Outlook 5
J Outlook Rules not show Master Category List Using Outlook.com accounts in Outlook 4
William getting custom form to load category colors Outlook VBA and Custom Forms 4
Diane Poremsky Categorize Messages using Contact Category New Slipstick.com Articles 0
T Macro to find contacts by category and copy them to another folder Outlook VBA and Custom Forms 15
bifjamod Saving sent email to specific folder based on category with wildcard Outlook VBA and Custom Forms 1
K Outlook 2010 - Set the category based on category of other emails in same conversatio Using Outlook 20
A How are you handling Outlook.com category issue and syncing Using Outlook.com accounts in Outlook 2
T default category Outlook VBA and Custom Forms 2
R click to toggle quick click category reasigns to where ? Using Outlook 2
L Change Category in a Task via macro Using Outlook 8
K Help! I selected every contact and mistakenly made them all the same category Using Outlook 1
R Filter Views by Category Using Outlook 2
S categories are being cut off after selecting from category pop up form Using Outlook 3
Similar threads


















































Top