Dim tRType As OlRecurrenceType
Dim tRPSD As Date
Dim tRPED As Date
Dim tST As Date
Dim tET As Date
Dim tOcc As Integer
Dim tInterval As Integer< br />
tRType = oAppointmentItem.GetRecurrencePattern.RecurrenceType
tRPSD = oAppointmentItem.GetRecurrencePattern.PatternStartDate
tRPED = oAppointmentItem.startRecurrencePattern.PatternEndDate
Pattern.PatternEndDate
Pattern. >tET = oAppointmentItem.GetRecurrencePattern.endTime
tOcc = oAppointmentItem.GetRecurrencePattern.Occurrences
tInterval = oAppointmentItem.GetRecurrencePattern.Interval
oAppointmentItem.ClearRecurrencePattern save
oAppointmentItem.ClearRecurrence error.
'oAppointmentItem.Save
' Make this call to flip to reccurring...
oAppointmentItem.GetRecurrencePattern
oAppointmentItem.GetRecurrencePattern.RecurrenceType = tRType
oAppointmentItem.GetRecu rrencePattern.PatternStartDate = tRPSD
oAppointmentItem.GetRecurrencePattern.PatternEndDate = tRPED
oAppointmentItem.GetRecurrencePattern.startTime = tST
oAppointmentItem.GetRecurrencePattern.endTime = tOccRepoint. br />oAppointmentItem.GetRecurrencePattern.Interval = tInterval
So far, I have no luck with this method. Once ClearRecurrencePattern is called, all data cannot be updated (or will not last anyway), this is Why I tried Save but, it doesn’t work. There must be a better way, I just missed it.
I also thought about making a full copy of a dating project and then deleting/re-adding it, However, I want to avoid this if possible.
p>
Dim tEndDate As Date
Dim currentEndDate As Date
Dim dateInterval As Double
currentEndDate = oAppointmentItem.GetRecurrencePattern.PatternEndDate
tEndDate = oAppointmentItem.GetRecurrencePattern.PatternEndDate
>'Add a year to the end date so we can force the exceptions to remove.
DateAdd "yyyy", 1, tEndDate
oAppointmentItem.GetRecurrencePattern.PatternEndDate = tEndDate
oAppointmentItem.GetRecurrencePattern.PatternEndDate = currentEndDate
I have an Outlook Series, but there are some exceptions. What I want to do is delete all exceptions in this series. Does anyone know if there is a way to do this? Since the exception list is read-only, I have tried to clear the recurrence pattern and reapply all values instead of the exception list, as shown below:
Dim tRType As OlRecurrenceType
Dim tRPSD As Date
Dim tRPED As Date
Dim tST As Date
Dim tET As Date
Dim tOcc As Integer
Dim tInterval As Integer< br />
tRType = oAppointmentItem.GetRecurrencePattern.RecurrenceType
tRPSD = oAppointmentItem.GetRecurrencePattern.PatternStartDate
tRPED = oAppointmentItem.startRecurrencePattern.PatternEndDate
Pattern.PatternEndDate
Pattern. >tET = oAppointmentItem.GetRecurrencePattern.endTime
tOcc = oAppointmentItem.GetRecurrencePattern.Occurrences
tInterval = oAppointmentItem.GetRecurrencePattern.Interval
oAppointmentItem.ClearRecurrencePattern save
oAppointmentItem.ClearRecurrence error.
'oAppointmentItem.Save
' Make this call to flip to reccurring...
oAppointmentItem.GetRecurrencePattern
oAppointmentItem.GetRecurrencePattern.RecurrenceType = tRType
oAppointmentItem.GetRecurre ncePattern.PatternStartDate = tRPSD
oAppointmentItem.GetRecurrencePattern.PatternEndDate = tRPED
oAppointmentItem.GetRecurrencePattern.startTime = tST
oAppointmentItem.GetRecurrencePattern.endTime = tCCRecurrenceItem. br />oAppointmentItem.GetRecurrencePattern.Interval = tInterval
So far, I have no luck with this method. Once ClearRecurrencePattern is called, all data cannot be updated (or will not last anyway), this is Why I tried Save but, it doesn’t work. There must be a better way, I just missed it.
I also thought about making a full copy of a dating project and then deleting/re-adding it, However, I want to avoid this if possible.
I found the answer and posted it here just in case it is needed. You can modify patternendtime (I assume the start time) to make it clear the exception list. The code below will cause all exceptions to be removed from the series.
Dim tEndDate As Date
Dim currentEndDate As Date
Dim dateInterval As Double
currentEndDate = oAppointmentItem.GetRecurrencePattern.PatternEndDate
tEndDate = oAppointmentItem.GetRecurrencePattern.PatternEndDate
' Add a year to the end date so we can force the exceptions to remove.
DateAdd "yyyy", 1, tEndDate
oAppointmentItem.GetRecu rrencePattern.PatternEndDate = tEndDate
oAppointmentItem.GetRecurrencePattern.PatternEndDate = currentEndDate