Outlook) (Inspector.SetSchedulingStartTime 方法

在檢查器 [ 排程助理員 ] 索引標籤上的空閒/忙碌方格中設定會議項目的開始時間。

語法

expression。 SetSchedulingStartTime( _Start_ )

運算式 代表 'Inspector' 物件的變數。

參數

名稱 必要/選用 資料類型 描述
Start 必要 Date Inspector 的 [排程小幫手] 索引標籤要針對會議參與者顯示的空閒/忙碌時間範圍起點。

註解

由父 Inspector 物件的 CurrentItem 屬性指定的物件必須是 AppointmentItem 或 MeetingItem。 [ 排程助理員 ] 索引標籤必須顯示在檢查器中,否則 Microsoft Outlook 會引發錯誤。 如果 Outlook 無法顯示該項目類型的 [排程助理員 ] 索引標籤,Outlook 會顯示下列錯誤: 只有當會議項目上顯示 [排程助理員] 時,才能設定排程開始時間。

範例

下列 Microsoft Visual Basic for Applications (VBA) 程式碼範例會顯示如何使用 SetSchedulingStartTime 方法,在 AppointmentItem 的 [排程小幫手] 索引標籤上設定排程開始時間。 約會開始時間會設定為從現在起的一個月後,而排程開始時間也會設定為從現在起的一個月後。

Sub DemoSetSchedulingStartTime() 
 
 Dim oAppt As Outlook.AppointmentItem 
 
 Dim oInsp As Outlook.inspector 
 
 
 
 ' Create and display appointment. 
 
 Set oAppt = Application.CreateItem(olAppointmentItem) 
 
 oAppt.MeetingStatus = olMeeting 
 
 oAppt.Subject = "Test Appointment" 
 
 oAppt.Start = DateAdd("m", 1, Now) 
 
 ' Display the appointment in the Appointment tab of the inspector. 
 
 oAppt.Display 
 
 
 
 Set oInsp = oAppt.GetInspector 
 
 ' Switch to the Scheduling Assistant tab in that inspector. 
 
 oInsp.SetCurrentFormPage ("Scheduling Assistant") 
 
 ' Set the appointment start time in the Scheduling Assistant. 
 
 oInsp.SetSchedulingStartTime (DateAdd("m", 1, Now)) 
 
End Sub

另請參閱

檢查物件

支援和意見反應

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