2017-04-17 94 views
0

我使用下面的代碼,但我只登記在主郵件帳戶的任命,我想知道這是可能登記在另一個Outlook帳戶直接任命:自vb以來,是否可以在多個Outlook帳戶中註冊約會?

.Recipients.Add("Roger Harui") 
      Dim sentTo As Outlook.Recipients = .Recipients 
      Dim sentInvite As Outlook.Recipient 
      sentInvite = sentTo.Add("Holly Holt") 
      sentInvite.Type = Outlook.OlMeetingRecipientType.olRequired 
+0

你真的調用了AppointmentItem.Send嗎? –

回答

0

Send方法發送項目使用爲會話指定的默認帳戶。

Private Sub CreateMeeting() 
    Dim appt As Outlook.AppointmentItem = _ 
    CType(Application.CreateItem(_ 
    Outlook.OlItemType.olAppointmentItem), Outlook.AppointmentItem) 
    appt.Subject = "Customer Review" 
    appt.MeetingStatus = Outlook.OlMeetingStatus.olMeeting 
    appt.Location = "36/2021" 
    appt.Start = DateTime.Parse("19/04/2017 10:00 AM") 
    appt.End = DateTime.Parse("19/04/2017 11:00 AM") 
    Dim recipRequired As Outlook.Recipient = _ 
     appt.Recipients.Add("Ryan Gregg") 
    recipRequired.Type = _ 
     Outlook.OlMeetingRecipientType.olRequired 
    Dim recipOptional As Outlook.Recipient = _ 
     appt.Recipients.Add("Peter Allenspach") 
    recipOptional.Type = _ 
     Outlook.OlMeetingRecipientType.olOptional 
    Dim recipConf As Outlook.Recipient = _ 
     appt.Recipients.Add("Conf Room 36/2021 (14) AV") 
    recipConf.Type = _ 
     Outlook.OlMeetingRecipientType.olResource 
    appt.Recipients.ResolveAll() 
    appt.Send() 
End Sub 

更多信息請參見How to: Specify Different Recipient Types for an Appointment Item

+0

非常感謝你的貢獻真的幫了我很多 – JoseEduardo

相關問題