Apply a category to item in inbox view

  • Thread starter Thread starter RFN0cm9uZw
  • Start date Start date
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
 
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.
Similar threads
Thread starter Title Forum Replies Date
C Apply Category Color for Appointment Background Color Using Outlook 2
G Apply Custom Contacts form to all existing Contacts Outlook VBA and Custom Forms 1
A Apply Selected Emails to outlook rules and Run Rules Using Outlook 5
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 Using Outlook 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 Using Outlook 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
L Unable to apply SP1 to Exchange 2010 Exchange Server Administration 5
H Create/Apply auto formatting rules by VB? Outlook VBA and Custom Forms 2
farrissf Category list to pick from Outlook VBA and Custom Forms 4
B Outlook 2019 Automatically move email after assigning category Using Outlook 4
F Add a category before "Send an Email When You Add an Appointment to Your Calendar" Outlook VBA and Custom Forms 0
V Macro to mark email with a Category Outlook VBA and Custom Forms 4
P Emails assigned with a certain category (within a shared inbox) to be copied to a specific folder. Outlook VBA and Custom Forms 2
R Clear one category when another is chosen Outlook VBA and Custom Forms 1
A VBA Script - Print Date between first email in Category X and last email in Category Y Outlook VBA and Custom Forms 3
R Auto Assign Category colours to Incoming Emails based on whom the email is addressed Outlook VBA and Custom Forms 3
A Unflag Inbox and Flag Inbox with Orange Category After Item is send Outlook VBA and Custom Forms 3
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 Using Outlook 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 Using Outlook 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

Similar threads

Back
Top