4
我有一系列的Outlook,但有一些例外。我想要做的是從本系列中刪除所有例外。有誰知道是否有辦法做到這一點?由於例外列表是隻讀的我已經試過清除重複模式,並重新將所有的值SANS這樣的例外列表中:刪除系列的例外
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
tRType = oAppointmentItem.GetRecurrencePattern.RecurrenceType
tRPSD = oAppointmentItem.GetRecurrencePattern.PatternStartDate
tRPED = oAppointmentItem.GetRecurrencePattern.PatternEndDate
tST = oAppointmentItem.GetRecurrencePattern.startTime
tET = oAppointmentItem.GetRecurrencePattern.endTime
tOcc = oAppointmentItem.GetRecurrencePattern.Occurrences
tInterval = oAppointmentItem.GetRecurrencePattern.Interval
oAppointmentItem.ClearRecurrencePattern
' This save throws an error.
'oAppointmentItem.Save
' Make this call to flip to reccurring...
oAppointmentItem.GetRecurrencePattern
oAppointmentItem.GetRecurrencePattern.RecurrenceType = tRType
oAppointmentItem.GetRecurrencePattern.PatternStartDate = tRPSD
oAppointmentItem.GetRecurrencePattern.PatternEndDate = tRPED
oAppointmentItem.GetRecurrencePattern.startTime = tST
oAppointmentItem.GetRecurrencePattern.endTime = tET
oAppointmentItem.GetRecurrencePattern.Occurrences = tOcc
oAppointmentItem.GetRecurrencePattern.Interval = tInterval
到目前爲止我有這種方法沒有運氣。一旦調用ClearRecurrencePattern,所有數據都不能更新(或者不會持續),這就是爲什麼我嘗試了Save但它不起作用。必須有更好的方法,我只是想念它。
我也想過做一個預約項目的完整副本,然後刪除/重新添加,但是,我想盡可能避免這種情況。
應該指出,這清除*所有*例外。 – 2011-12-11 06:08:30