2017-04-17 58 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

相关问题