生成会议请求

时间:2020-06-15 10:41:16

标签: vba outlook

我在Excel中有代码可以生成会议并将其放置在收件人的Outlook日历中。

我希望发送一个收件人可以接受或拒绝的请求,而不是发送已经被接受的会议。

Dim outMail As Outlook.AppointmentItem
Set outMail = Outlook.CreateItem(olAppointmentItem)
outMail.Subject = "A new appointment has been booked for me"
outMail.Location = "Your Desk"
outMail.MeetingStatus = olMeeting
outMail.Start = CDate(DateSelected) & Chr(32) & CDate(TimeSelected)
outMail.Duration = 30
outMail.RequiredAttendees = "myemail@hotmail.com"
outMail.Body = "No Reason"
outMail.ReminderSet = True
outMail.Send
Set outMail = Nothing

1 个答案:

答案 0 :(得分:0)

检查:

https://docs.microsoft.com/fr-fr/office/vba/api/outlook.appointmentitem.respond

您只需要使用:

appointmentitem.Respond( Response ,true)