cerating category in outlook 2003 from c#

Status
Not open for further replies.
H

hemaneelagiri

hi

i am uisng "Microsoft Outlook 11.0 Object Library" as refernce

and want to cerate new appointment in outlook 2003 with custom category and

with different color(label)

in outlook 2007 it is there with name sapce in that machine i am able to

cerate category and it is working properly

if (oNS.Categories["my cat"] == null)

{

oNS.Categories.Add("my cat", Microsoft.Office.Interop.Outlook.OlCategoryColor.

olCategoryColorDarkPurple, Microsoft.Office.Interop.Outlook.

OlCategoryShortcutKey.olCategoryShortcutKeyNone);

}

oAppointment.Categories = oAppointment.Categories + ";" + "my cat";

please help me
 
On 20 Aug., 08:26, "hemaneelagiri" <u54138@uwe> wrote:
> hi

> i am uisng "Microsoft Outlook 11.0 Object Library" as refernce
> and want to cerate new appointment in outlook 2003 with custom category and
> with different color(label)

> in outlook 2007 it is there with name sapce in that machine i am able to
> cerate category and  it is working properly
> if (oNS.Categories["my cat"] == null)
> {
> oNS.Categories.Add("my cat", Microsoft.Office.Interop.Outlook.OlCategoryColor.
> olCategoryColorDarkPurple, Microsoft.Office.Interop.Outlook.
> OlCategoryShortcutKey.olCategoryShortcutKeyNone);}

> oAppointment.Categories = oAppointment.Categories + ";" + "my cat";

> please help me


Outlook 2007 categories seem to work a bit differently. Before that

categories were kept in the registry. See http://www.slipstick.com/outlook/olcat.asp.

Does that help?
 
hi thanks for ur reply.

in my registry i am not able to find category key in HKEY_CURRENT_USER\

Software\Microsoft\Office\11.0\Outlook

and i need create new category from C# in outlook 2003 and want to apply

label ,when i select that category

for new appointment(which is from my code) should be in that lable color.

Thanks

Tobias Böhm wrote:
> > hi
> >

> [quoted text clipped - 13 lines]
>

>> please help me


> Outlook 2007 categories seem to work a bit differently. Before that
> categories were kept in the registry. See http://www.slipstick.com/outlook/olcat.asp.
> Does that help?
 
On 20 Aug., 09:25, "hemaneelagiri" <u54138@uwe> wrote:
> hi thanks for ur reply.
> in my registry i am not able to find category key in HKEY_CURRENT_USER\
> Software\Microsoft\Office\11.0\Outlook

> and i need create new category from C# in outlook 2003 and want to apply
> label ,when i select that category
> for new  appointment(which is from my code)  should be in that lable color.

> Thanks

> Tobias Böhm wrote:
> >> hi

>
> >[quoted text clipped - 13 lines]

>
> >> please help me

>
> >Outlook 2007 categories seem to work a bit differently. Before that
> >categories were kept in the registry. Seehttp://www.slipstick.com/outlook/olcat.asp.
> >Does that help?


Ok, the "Category" key appeared once I manually added a category in

Outlook's category manager. Anyone an idea why this is the case? Where

does Outlook find the categories before that?

If you want to change the appointment item depending on the category

you could use the event that gets fired when an item is created. There

you check if the category is your custom one and then modify the item

accordingly.
 
not like that i want to apply label for my newly cerated appointment.

when i give like this

oAppointment.Categories = oAppointment.Categories + ";" + "my new" + ";" +

"Business";

oAppointment.Save();

when i check the appointment in outlook category is coming in cateogry box,

but it is showing "my new ( not in master category list)"

means it is not adding master category list.

when i give category is business ven though the appointment is not is

business color

how can i select business label color

Thanks

Tobias Böhm wrote:
> > hi thanks for ur reply.
> > in my registry i am not able to find category key in HKEY_CURRENT_USER\

> [quoted text clipped - 15 lines]
> > >categories were kept in the registry. Seehttp://www.slipstick.com/outlook/olcat.asp.
> > >Does that help?


> Ok, the "Category" key appeared once I manually added a category in
> Outlook's category manager. Anyone an idea why this is the case? Where
> does Outlook find the categories before that?

> If you want to change the appointment item depending on the category
> you could use the event that gets fired when an item is created. There
> you check if the category is your custom one and then modify the item
> accordingly.
 
In Outlook 2003 the master category list won't be added to the registry

before you add the first item of your own. And adding a category directly to

an item by code doesn't put it into the master list. That is you always have

to write that yourself into the registry. See this for some more details:

http://www.vboffice.net/en/articles/outlook-categories#t6

No matter how you add a category in Outlook 2003, that has nothing to do

with the color labels for appointments. Labels aren't exposed by the Outlook

object model. Here's an example for how to add labels:

http://www.vboffice.net/en/developers/color-label-for-calendar-items

Best regards

Michael Bauer

Am Thu, 20 Aug 2009 08:38:52 GMT schrieb hemaneelagiri:


> not like that i want to apply label for my newly cerated appointment.
> when i give like this
> oAppointment.Categories = oAppointment.Categories + ";" + "my new" + ";"


+
> "Business";
> oAppointment.Save();

> when i check the appointment in outlook category is coming in cateogry


box,
> but it is showing "my new ( not in master category list)"
> means it is not adding master category list.
> when i give category is business ven though the appointment is not is
> business color

> how can i select business label color

> Thanks

> Tobias Böhm wrote:
> >> hi thanks for ur reply.
> >> in my registry i am not able to find category key in HKEY_CURRENT_USER\

> >[quoted text clipped - 15 lines]
> >> >categories were kept in the registry.


Seehttp://www.slipstick.com/outlook/olcat.asp.
> >> >Does that help?

>

>>Ok, the "Category" key appeared once I manually added a category in
> >Outlook's category manager. Anyone an idea why this is the case? Where
> >does Outlook find the categories before that?
>

>>If you want to change the appointment item depending on the category
> >you could use the event that gets fired when an item is created. There
> >you check if the category is your custom one and then modify the item
> >accordingly.
 
:( but that is control, can't v set with code not using any controls

Michael Bauer wrote:
> In Outlook 2003 the master category list won't be added to the registry
> before you add the first item of your own. And adding a category directly to
> an item by code doesn't put it into the master list. That is you always have
> to write that yourself into the registry. See this for some more details:

> http://www.vboffice.net/en/articles/outlook-categories#t6

> No matter how you add a category in Outlook 2003, that has nothing to do
> with the color labels for appointments. Labels aren't exposed by the Outlook
> object model. Here's an example for how to add labels:

> http://www.vboffice.net/en/developers/color-label-for-calendar-items
>
> > not like that i want to apply label for my newly cerated appointment.
> > when i give like this

> [quoted text clipped - 26 lines]
> >>you check if the category is your custom one and then modify the item
> >>accordingly.
 
Not sure if I understand you. You don't have to use any controls or third

party software. As for the label appointment example, instead of using the

Redemption you can also use CDO 1.21, which comes with your Outlook.

Best regards

Michael Bauer

Am Thu, 20 Aug 2009 10:43:46 GMT schrieb hemaneelagiri:


> :( but that is control, can't v set with code not using any controls

> Michael Bauer wrote:
> >In Outlook 2003 the master category list won't be added to the registry
> >before you add the first item of your own. And adding a category directly


to
> >an item by code doesn't put it into the master list. That is you always


have
> >to write that yourself into the registry. See this for some more details:
>

>>http://www.vboffice.net/en/articles/outlook-categories#t6
>

>>No matter how you add a category in Outlook 2003, that has nothing to do
> >with the color labels for appointments. Labels aren't exposed by the


Outlook
> >object model. Here's an example for how to add labels:
>

>>http://www.vboffice.net/en/developers/color-label-for-calendar-items
> >
> >> not like that i want to apply label for my newly cerated appointment.
> >> when i give like this

> >[quoted text clipped - 26 lines]
> >>>you check if the category is your custom one and then modify the item
> >>>accordingly.
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
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
R Filter Views by Category Using Outlook 2
S categories are being cut off after selecting from category pop up form Using Outlook 3
D Search on Category in Outlook 2013 Using Outlook 1
R Any idea why my category colours aren't showing in my calendar? Using Outlook 0
M Searching for categories not in the master category list Using Outlook 3
L Category List Using Outlook 43
F Export Outlook contacts by One Category Using Outlook 1
M Cannot change category in inbox; Can change it in popup Using Outlook 0
R Restore Master Category List Outlook 2013 Using Outlook 7
D Macro to export mail data based on assigned category Using Outlook 3
C Custom form with custom colour category visible to all users in public folders Using Outlook 1
J Contacts: Assigning followup date by category Using Outlook 2
C Apply Category Color for Appointment Background Color Using Outlook 2
J Calendar Search by Category not showing expected results Using Outlook 7
S Printing Category Key on Calendar Using Outlook 1
A Can Rule Check Category Contact is assigned? Using Outlook 1
J View All Category Items Using Outlook 1
R Duplicating Category Colors For Second User Using Outlook 1

Similar threads

Back
Top