使用 MATLAB actxserver 更改 Outlook 中的响应选项

Changing the response options in Outlook with MATLAB actxserver

下面是一个简单的 MATLAB actxserver 示例,用于发送 Outlook 邀请,没有任何问题。但是,我的问题是如何关闭回复选项。必要的与会者不必回复,无论他们是否在场。

out = actxserver('outlook.Application');
appointment = out.CreateItem('olAppointmentItem');
appointment.Subject = 'My Subject';
appointment.Body = 'Appointment in MATLAB';
appointment.Start = '13/01/2022 09:00:00';
appointment.End = '13/01/2022 09:30:00';
appointment.RequiredAttendees = 'one@email.com; two@email.com';
appointment.Save();
appointment.Send
out.release;

您应该可以从文档中关闭 ResponseRequested 属性:

https://docs.microsoft.com/en-us/office/vba/api/outlook.appointmentitem.responserequested

Returns a Boolean that indicates True if the sender would like a response to the meeting request for the appointment. Read/write.

即在你的情况下,appointment.ResponseRequested = false;