Muokkaa

Jaa


Inspector.SetSchedulingStartTime method (Outlook)

Sets the start time for a meeting item in the free/busy grid on the Scheduling Assistant tab of the inspector.

Syntax

expression. SetSchedulingStartTime( _Start_ )

expression A variable that represents an 'Inspector' object.

Parameters

Name Required/Optional Data type Description
Start Required Date The beginning of the time range that the Scheduling Assistant tab of the inspector displays free/busy times for meeting attendees.

Remarks

The object specified by the CurrentItem property of the parent Inspector object must be an AppointmentItem or MeetingItem. The Scheduling Assistant tab must be displayed in the inspector, otherwise Microsoft Outlook raises an error. If Outlook cannot display the Scheduling Assistant tab for that item type, Outlook displays the following error: The scheduling start time can only be set when the Scheduling Assistant is displayed on a meeting item.

Example

The following code sample in Microsoft Visual Basic for Applications (VBA) shows how to use the SetSchedulingStartTime method to set the scheduling start time on the Scheduling Assistant tab of an AppointmentItem. The appointment start time is set to one month from now, and the scheduling start time is also set to one month from now.

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

See also

Inspector Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.