WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

cerating category in outlook 2003 from c#

 
   Home -> Office -> Program Add-Ins RSS
Next:  Outlook 2007 error message 0x08007000E  
Author Message
hemaneelagiri

External


Since: Aug 20, 2009
Posts: 4



(Msg. 1) Posted: Thu Aug 20, 2009 3:05 am
Post subject: cerating category in outlook 2003 from c#
Archived from groups: microsoft>public>outlook>program_addins (more info?)

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
Back to top
Login to vote
Tobias_Böhm

External


Since: Aug 20, 2009
Posts: 2



(Msg. 2) Posted: Thu Aug 20, 2009 3:05 am
Post subject: Re: cerating category in outlook 2003 from c# [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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?
Back to top
Login to vote
Tobias_Böhm

External


Since: Aug 20, 2009
Posts: 2



(Msg. 3) Posted: Thu Aug 20, 2009 3:05 am
Post subject: Re: cerating category in outlook 2003 from c# [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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.
Back to top
Login to vote
hemaneelagiri

External


Since: Aug 20, 2009
Posts: 4



(Msg. 4) Posted: Thu Aug 20, 2009 4:05 am
Post subject: Re: cerating category in outlook 2003 from c# [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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?
Back to top
Login to vote
hemaneelagiri

External


Since: Aug 20, 2009
Posts: 4



(Msg. 5) Posted: Thu Aug 20, 2009 5:05 am
Post subject: Re: cerating category in outlook 2003 from c# [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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.
Back to top
Login to vote
Michael Bauer [MVP - Outl

External


Since: Aug 04, 2006
Posts: 1337



(Msg. 6) Posted: Thu Aug 20, 2009 6:05 am
Post subject: Re: cerating category in outlook 2003 from c# [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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/workshop.html?pub=6&lang=en&smp=1&cmd=showitem#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/sample.html?mnu=2&pub=6&lang=en&smp=55&cmd=showitem

--
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 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.
Back to top
Login to vote
hemaneelagiri

External


Since: Aug 20, 2009
Posts: 4



(Msg. 7) Posted: Thu Aug 20, 2009 7:05 am
Post subject: Re: cerating category in outlook 2003 from c# [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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


Michael Bauer [MVP - Outlook] 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/workshop.html?pub=6&lang=en&smp=1&cmd=showitem#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/sample.html?mnu=2&pub=6&lang=en&smp=55&cmd=showitem
>
>> 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.
Back to top
Login to vote
Michael Bauer [MVP - Outl

External


Since: Aug 04, 2006
Posts: 1337



(Msg. 8) Posted: Thu Aug 20, 2009 4:05 pm
Post subject: Re: cerating category in outlook 2003 from c# [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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 - 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 Thu, 20 Aug 2009 10:43:46 GMT schrieb hemaneelagiri:

> Sad but that is control, can't v set with code not using any controls
>
>
> Michael Bauer [MVP - Outlook] 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/workshop.html?pub=6&lang=en&smp=1&cmd=showitem#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/sample.html?mnu=2&pub=6&lang=en&smp=55&cmd=showitem
>>
>>> 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.
Back to top
Login to vote
Display posts from previous:   
       Home -> Office -> Program Add-Ins All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Categories:
 Windows XP
 Windows Vista
 Windows Other
  Office
 Office Other
 Security
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET |
  • IT Support