AppointmentItem.Send 方法 (Outlook)

會傳送約會。

語法

expressionSend

表達 代表 AppointmentItem 物件的 變數。

註解

Send方法會使用為會話指定的預設帳戶來傳送專案。 在設定檔中定義多個 Microsoft Exchange 帳戶的會話中,新增至設定檔的第一個 Exchange 帳戶是主要 Exchange 帳戶,也是會話的預設帳戶。 若要指定不同的帳戶來傳送專案,請將 SendUsingAccount 屬性設定為所需的 Account 物件,然後呼叫 Send 方法。

範例

這個 Visual Basic for Applications (VBA) 範例會使用 CreateItem 來建立約會。 此範例會將 MeetingStatus 屬性設定為 olMeeting ,以將約會表示為會議邀請,並將必要的出席者、選擇性的出席者和會議位置設定為資源。 然後該範例會顯示及傳送約會項目。

Sub CreateAppt() 
 Dim myItem As Object 
 Dim myRequiredAttendee, myOptionalAttendee, myResourceAttendee As Outlook.Recipient 
 
 Set myItem = Application.CreateItem(olAppointmentItem) 
 myItem.MeetingStatus = olMeeting 
 myItem.Subject = "Strategy Meeting" 
 myItem.Location = "Conf Rm All Stars" 
 myItem.Start = #9/24/2009 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("Conf Rm All Stars") 
 myResourceAttendee.Type = olResource 
 myItem.Display 
 myItem.Send 
End Sub

另請參閱

AppointmentItem 物件

支援和意見反應

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