F
Florian Lehner
Hi,
I have got the following problem:
In my application, I want to shift certain Outlook appointments (e.g. "have
all appointments in June 2007 start one hour later").
My code works fine for single appointments and for recurrences starting in
the month selected (e.g. June 2007).
Sadly it doesn't work for recurring appointments if the first element of
this recurrence is not in the month selected (e.g. I want to process June and
the recurrence has started in March).
Here'S some (C#) code:
Application OlApp = new Application();
NameSpace OlNamspace = OlApp.GetNamespace("MAPI");
MAPIFolder AppointmentFolder =
OlNamspace.GetDefaultFolder(OlDefaultFolders.olFolderCalendar);
AppointmentFolder.Items.IncludeRecurrences = true;
foreach (AppointmentItem app in AppointmentFolder.Items)
{
// do something
}
In my foreach statement, only single AppointmentItem objects are processed,
or starting AppointmentItems of a recurrence. Other Items of recurrences are
simply not found.
My question is, how do I get a handle on those appointments which are part
of a recurrence?
// Die folgende Schleife wird für jeden Termin (AppointmentItem
im betr. Ordner durchgeführt
foreach (AppointmentItem app in AppointmentFolder.Items)
I have got the following problem:
In my application, I want to shift certain Outlook appointments (e.g. "have
all appointments in June 2007 start one hour later").
My code works fine for single appointments and for recurrences starting in
the month selected (e.g. June 2007).
Sadly it doesn't work for recurring appointments if the first element of
this recurrence is not in the month selected (e.g. I want to process June and
the recurrence has started in March).
Here'S some (C#) code:
Application OlApp = new Application();
NameSpace OlNamspace = OlApp.GetNamespace("MAPI");
MAPIFolder AppointmentFolder =
OlNamspace.GetDefaultFolder(OlDefaultFolders.olFolderCalendar);
AppointmentFolder.Items.IncludeRecurrences = true;
foreach (AppointmentItem app in AppointmentFolder.Items)
{
// do something
}
In my foreach statement, only single AppointmentItem objects are processed,
or starting AppointmentItems of a recurrence. Other Items of recurrences are
simply not found.
My question is, how do I get a handle on those appointments which are part
of a recurrence?
// Die folgende Schleife wird für jeden Termin (AppointmentItem
im betr. Ordner durchgeführt
foreach (AppointmentItem app in AppointmentFolder.Items)