Hi All,
I'm trying to either mark or delete some occurrences of a Recurring Event via some code that is executed by a button press.
To be honest, I'm struggling to even mark an event as an exception let alone delete it. I've tried various code combinations - none with success. Some of the things I've tried include:-
on the button press after selecting an event -
pMasterEvent = ?OLE{'ActiveView.GetSelectedEvents.ViewEvent(0).Event.RecurrencePattern.MasterEvent'}
pPatternObj = ?OLE{pMasterEvent & '.RecurrencePattern'}
pRecurObj = ?OLE{'ActiveView.GetSelectedEvents.ViewEvent(0).Event'}
?OLE{pRecurObj & '.MakeAsRException'}
?OLE{pMasterEvent & '.RecurrencePattern.SetException(' & pRecurObj & ')'}
?OLE{pMasterObj & '.UpdateRecurrence(' & pPatternObj & ')'}
?OLE{'DataProvider.ChangeEvent(' & pRecurObj & ')'}
?OLE{'DataProvider.ChangeEvent(' & pMasterEvent & ')'}
?OLE{'Populate'}
?OLE{'RedrawControl'}
OR
on the SelectedChanged event when a Calendar Event has been selected -
pMasterObj = OLEControlFEQ{'ActiveView.HitTest.ViewEvent.Event.RecurrencePattern.MasterEvent'}
pPatternObj = OLEControlFEQ{pMasterObj & '.RecurrencePattern'}
OLEControlFEQ{pPatternObj & '.Exceptions.SetException.Add(' & OLEControlFEQ{'ActiveView.HitTest.ViewEvent.Event'} & ')'}
OLEControlFEQ{pMasterObj & '.UpdateRecurrence(' & pPatternObj & ')'}
OLEControlFEQ{'DataProvider.ChangeEvent(' & pMasterObj & ')'}
Obviously it’s something that I've either missed or misunderstood.
I'd really appreciate some help and guidance on the steps needed to delete an occurrence of a Recurring Event.
Many thanks in advance,
Andy
PS. I do have a full annual subscription (well, 2 actually because of 2 difference companies J)