A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

C#, Redemption, not able to set appointment color in Outlook 2003



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old July 23rd 08, 01:09 PM posted to microsoft.public.outlook.program_addins
Johan Machielse[_2_]
external usenet poster
 
Posts: 11
Default C#, Redemption, not able to set appointment color in Outlook 2003

Dear reader,

I use the following piece of code to change the color of an appointment in
the calendar (appointment is of type Outlook.AppointmentItem). It does not
seem to work??? Any ideas what I am doing wrong?

Rdo.SafeAppointmentItem safe = new Rdo.SafeAppointmentItem();
safe.Item = appointment;
int propertyID = safe.GetIDsFromNames(
"{00062002-0000-0000-C000-000000000046}", 0x8214 );
propertyID = propertyID | 0x3;
safe.set_Fields( propertyID, color );
appointment.Save();

Thank you in advance!

Regards,

Johan Machielse
Avanade
Ads
  #2  
Old July 23rd 08, 03:24 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default C#, Redemption, not able to set appointment color in Outlook 2003

Outlook doesn't know anything about changes you make to an item using
Extended MAPI (Redemption), so when you save the appointment your changes
are being ignored or overwritten.

Try this and see if it works better:

Rdo.SafeAppointmentItem safe = new Rdo.SafeAppointmentItem();
safe.Item = appointment;
int propertyID = safe.GetIDsFromNames(
"{00062002-0000-0000-C000-000000000046}", 0x8214 );
propertyID = propertyID | 0x3;
safe.set_Fields( propertyID, color );

appointment.Subject = appointment.Subject; // new code line

appointment.Save();


--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Johan Machielse" wrote in
message news
Dear reader,

I use the following piece of code to change the color of an appointment in
the calendar (appointment is of type Outlook.AppointmentItem). It does not
seem to work??? Any ideas what I am doing wrong?

Rdo.SafeAppointmentItem safe = new Rdo.SafeAppointmentItem();
safe.Item = appointment;
int propertyID = safe.GetIDsFromNames(
"{00062002-0000-0000-C000-000000000046}", 0x8214 );
propertyID = propertyID | 0x3;
safe.set_Fields( propertyID, color );
appointment.Save();

Thank you in advance!

Regards,

Johan Machielse
Avanade


  #3  
Old July 23rd 08, 03:36 PM posted to microsoft.public.outlook.program_addins
Johan Machielse[_2_]
external usenet poster
 
Posts: 11
Default C#, Redemption, not able to set appointment color in Outlook 2

Ken,

It works great!

Thank you!

Mvg,

Johan Machielse
Avanade

"Ken Slovak - [MVP - Outlook]" wrote:

Outlook doesn't know anything about changes you make to an item using
Extended MAPI (Redemption), so when you save the appointment your changes
are being ignored or overwritten.

Try this and see if it works better:

Rdo.SafeAppointmentItem safe = new Rdo.SafeAppointmentItem();
safe.Item = appointment;
int propertyID = safe.GetIDsFromNames(
"{00062002-0000-0000-C000-000000000046}", 0x8214 );
propertyID = propertyID | 0x3;
safe.set_Fields( propertyID, color );

appointment.Subject = appointment.Subject; // new code line

appointment.Save();


--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Johan Machielse" wrote in
message news
Dear reader,

I use the following piece of code to change the color of an appointment in
the calendar (appointment is of type Outlook.AppointmentItem). It does not
seem to work??? Any ideas what I am doing wrong?

Rdo.SafeAppointmentItem safe = new Rdo.SafeAppointmentItem();
safe.Item = appointment;
int propertyID = safe.GetIDsFromNames(
"{00062002-0000-0000-C000-000000000046}", 0x8214 );
propertyID = propertyID | 0x3;
safe.set_Fields( propertyID, color );
appointment.Save();

Thank you in advance!

Regards,

Johan Machielse
Avanade



 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I set up color when someone else schedules appointment? TLC Outlook - Calandaring 4 July 15th 08 01:02 AM
Appointment Label Color OscarM Outlook and VBA 2 September 1st 06 04:15 PM
travel time available on appointment setting shown in other color james79703 Outlook - Calandaring 0 June 21st 06 06:53 PM
Appointment Label colors - what are they in the color palette? deko Outlook and VBA 2 January 18th 06 07:45 AM
Appointment RTF format problems using Redemption John Svercek Add-ins for Outlook 1 January 15th 06 10:41 PM


All times are GMT +1. The time now is 08:34 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.