Compartilhar via


Start Property

Returns or sets a Date indicating the starting date and time for the appointment or Journal entry. Read/write.

expression**.Start**

*expression   * Required. An expression that returns an AppointmentItem or JournalItem object.

Example

This Visual Basic for Applications (VBA) example uses CreateItem to create an appointment and uses MeetingStatus to set the meeting status to "Meeting" and to make it a meeting request with both a required and an optional attendee.

Sub ScheduleMeeting()
    Dim myOlApp As Outlook.Application
    Dim myItem as Outlook.AppointmentItem
    Dim myRequiredAttendee As Outlook.Recipient
    Dim myOptionalAttendee As Outlook.Recipient
    Dim myResourceAttendee As Outlook.Recipient
    Set myOlApp = CreateObject("Outlook.Application")
    Set myItem = myOlApp.CreateItem(olAppointmentItem)
    myItem.MeetingStatus = olMeeting
    myItem.Subject = "Strategy Meeting"
    myItem.Location = "Conference Room B"
    myItem.Start = #9/24/2003 1:30:00 PM#
    myItem.Duration = 90
    Set myRequiredAttendee = myItem.Recipients.Add ("Nate Sun")
    myRequiredAttendee.Type = olRequired
    Set myOptionalAttendee = myItem.Recipients.Add ("Kevin Kennedy")
    myOptionalAttendee.Type = olOptional
    Set myResourceAttendee = myItem.Recipients.Add("Conference Room B")
    myResourceAttendee.Type = olResource
    myItem.Send
End Sub

If you use Microsoft Visual Basic Scripting Edition (VBScript) in a Microsoft Outlook form, you do not create the Application object, and you cannot use named constants. This example shows how to perform the same task using VBScript code.

Sub CommandButton1_Click()
 Set myItem = Application.CreateItem(1)
 myItem.MeetingStatus = 1
 myItem.Subject = "Strategy Meeting"
 myItem.Location = "Conference Room B"
 myItem.Start = #9/24/03 1:30:00 PM#
 myItem.Duration = 90
 Set myRequiredAttendee = myItem.Recipients.Add ("Nate Sun")
 myRequiredAttendee.Type = 1
 Set myOptionalAttendee = myItem.Recipients.Add ("Kevin Kennedy")
 myOptionalAttendee.Type = 2
 Set myResourceAttendee = myItem.Recipients.Add("Conference Room B")
 myResourceAttendee.Type = 3
 myItem.Send
End Sub

Applies to | AppointmentItem Object | JournalItem Object

See Also | Duration Property | End Property | Interval Property | OnError Event | PatternEndDate Property | PatternStartDate Property | Progress Event | StartTimer Method | Stop Method | StopTimer Method | SyncEnd Event | SyncObjects Object | SyncStart Event