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

関連する問題