Vba 从vb开始,是否可以在多个Outlook帐户中注册约会?
我正在使用以下代码,但我只在主邮件帐户中注册了约会,我想知道是否可以在另一个Outlook帐户中注册直接约会:Vba 从vb开始,是否可以在多个Outlook帐户中注册约会?,vba,vb.net,outlook,appointment,Vba,Vb.net,Outlook,Appointment,我正在使用以下代码,但我只在主邮件帐户中注册了约会,我想知道是否可以在另一个Outlook帐户中注册直接约会: .Recipients.Add("Roger Harui") Dim sentTo As Outlook.Recipients = .Recipients Dim sentInvite As Outlook.Recipient sentInvite = sentTo.Add("Holly Holt")
.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
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
有关更多信息,请参阅。您是否真的调用了AppointItem.Send?非常感谢您的贡献,这对我帮助很大