Problem with ClearRecurrencePattern and Meetings


G

girardtim

Hello,


I'm using Outlook Object Model to update an appointment using C#.

I'm having a problem with clearing the recurrence pattern of an appointment
that has attendees.


I create a daily recurring meeting with no end date that starts 1 year ago.

Then I execute the following code on the AppointmentItem

AppointmentItem a;

....

a.ClearRecurrencePattern();
a.Save();

a.Send();


Everything works fine until the Send(), when calling Send() it adds the
recurrence back to the appointment and then sends the notices to the
attendees.

This is the RecurringMaster, and if I just save it, it looks correct, but
the notices don't get sent out.

Does anyone know what is wrong?
 
Ad

Advertisements

K

Ken Slovak - [MVP - Outlook]

After saving it get the EntryID for the item, release all references to it
using Marshal.ReleaseComObject(), then get a new instance using
NameSpace.GetItemFromID() and see if sending that works for you.
 
G

girardtim

This doesn't seem to fix it

Even if I run my code and just do the Save(), release everything then I use
Outlook to send the update, it adds the RecurrencePattern back before sending
the notices.

-Tim
 
Ad

Advertisements

G

girardtim

Actually, it looks like not everything was released between save and send

Your suggestion works, if i release after saving the recurrence doesn't come
back

thank you!
 

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