Outlook) (RecurrencePattern.Regenerate 屬性

傳回布 林值 ,指出工作是否應在週期性模式傳遞之後重新產生,則為 True 。 讀取/寫入。

語法

expression。 Regenerate

運算式 代表 RecurrencePattern 物件的變數。

註解

此屬性可用來控制完成每次週期性工作時的工作重新產生。 它僅對工作有效。 這不適用於約會。

若要建立週期模式,您必須先設定 RecurrenceType 屬性以設定頻率,然後將 Regenerate 屬性設為 True 以重新產生工作。 將 [重新產生 ] 設定為 [True] 之後,請勿將其設定為 [False]。 如果您後續將 Regenerate 設定為 False,則應該藉由取得新的 RecurrencePattern 物件,再次設定週期模式。

範例

這個 VBA (Visual Basic for Applications) 範例會建立名為「換油」的工作,該工作每三個月重複一次,並使用 Regenerate 屬性將其設定為在每次重複後重新產生。

Sub CreateTaskOilChange() 
 
 Dim myItem As Outlook.TaskItem 
 
 Dim myPattern As Outlook.RecurrencePattern 
 
 
 
 Set myItem = Application.CreateItem(olTaskItem) 
 
 Set myPattern = myItem.GetRecurrencePattern 
 
 myPattern.RecurrenceType = olRecursMonthly 
 
 myPattern.Regenerate = True 
 
 myPattern.Interval = 3 
 
 myItem.Subject = "Oil Change" 
 
 myItem.Save 
 
 myItem.Display 
 
End Sub

另請參閱

RecurrencePattern 物件

支援和意見反應

有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。