skip one ocurrence appointment from recurring appointment series

  • Thread starter hemaneelagiri via OfficeKB.com
  • Start date
H

hemaneelagiri via OfficeKB.com

Hi
i have recurring appointments in my application which displays & acts like
outlook. when i delete one ocurrence( not whole series) that particular
occurrance delete from that series and rest all same.
And when i am trying to synchronize those appointments to outlook. i am
creting recurring appointmnts with same pattern. but how can i skip the
selected occurrance from that series

Thanks
 
H

hemaneelagiri via OfficeKB.com

Hi this extended to earlier mail

i am able to get appointment recurringpatern ,
can we get Appointments in that recurringpattern

i am able to get particular appiotntment with date

AptItem = oNS.GetItemFromID(strEntryId, null) as Microsoft.Office.Interop.
Outlook.AppointmentItem;
Microsoft.Office.Interop.Outlook.RecurrencePattern recurrencePattern =
AptItem.GetRecurrencePattern();
Microsoft.Office.Interop.Outlook.AppointmentItem AptItem =
recurrencePattern.GetOccurrence(strDate);

but i want to get appointment collection based on date range
is it possible
 
H

hemaneelagiri via OfficeKB.com

Hi this extended to earlier mail

i am able to get no of appointments in selected appointment reccurring
pattern.
can i get appointmnet based on index like
"(Microsoft.Office.Interop.Outlook.MAPIFolder) fldCalendarApp.Items "
 
K

Ken Slovak - [MVP - Outlook]

You can only retrieve items in a recurring series by using GetOccurrence()
or if the item in the series is in the Exceptions collection. It's the same
if you want to get items in a time range, you have to use GetOccurrence()
repeatedly, calculating the following occurrence based on the recurrence
pattern for the series.
 
H

hemaneelagiri via OfficeKB.com

when i am trying to get appointmnetitem by using GetOccurrence()

like this
Microsoft.Office.Interop.Outlook.AppointmentItem RecurringAptItems = null;
RecurringAptItems =
recurrencePattern.GetOccurrence(dtFrom);

it is giving below error
"You changed one of the recurrences of this item, and this instance no longer
exists. Close any open items and try again."

can u please help me
 
K

Ken Slovak - [MVP - Outlook]

You have to allow for exceptions. If you don't get a specific occurrence
from a correct instance date using GetOccurrence() you have to handle that
and check the Exceptions collection and see if a matching instance is in
that collection. Each Exception object has an OriginalDate property you use
for comparison to see if there's a match with the desired date. You can then
get the new properties of the Exception by using its AppointmentItem object
property, and you can check the Deleted property to see if the instance was
deleted.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top