Programmation error in Finnish version of Outlook

  • Thread starter Thread starter Etienne Charland
  • Start date Start date
E

Etienne Charland

I have made a program that updates shared calendars (using Outlook 2002 /
Exchange Server). It works fine on my english computer. When I tried to run
it on a Finnish computer, I got this error: "Ehdon orminaisuus Categories ei
kelpaa", which means something like "Condition Property Categories is not
applicable". This seems to be thrown when I start deleting old calendar
entries. However, I can't debug it since that computer doesn't have VS.Net
installed. I do use the Categories property of the appointments; I set it to
"MIMOSA" in order to track it back when deleting old entries. By using
Outlook UI, I can delete appointments, create appointments and set the
category to that value without any problem. To me, this seems to be a bug
with the Finnish version of Outlook. Does anyone have a solution?

Thank you very much!

Etienne Charland
 
You might want to show any portion of your code that uses the Categories
property.
 
This is the C# code for deletion of old appointments, where the exception is
thrown.

Outlook.MAPIFolder Calendar =
olNamespace.GetSharedDefaultFolder(olNamespace.CreateRecipient(row.OutlookUs
er), Outlook.OlDefaultFolders.olFolderCalendar);
string Filter = string.Format("[Start] >= '{0}' AND [End] <= '{1}' AND
[Categories] = 'MIMOSA'", scheduleStartDate.ToString("d"),
scheduleEndDate.ToString("d"));
Outlook.Items Items = (Outlook.Items)Calendar.Items;
Outlook.AppointmentItem Item = (Outlook.AppointmentItem)Items.Find(Filter);
while (Item != null) {
Item.Delete();
Item = (Outlook.AppointmentItem)Items.FindNext();
}

Etienne
 
Back
Top