我正在使用VSTO开发Outlook的加载项。禁用向所有与会者发送更新VSTO
使用Send
方法MeetingItem
(AppointmentItem
)时,如何禁用发送更新到所有与会者弹出?当我打电话给现有会议的Send
时,它总是显示。
我只发现ForceUpdateToAllAttendees
属性,但它会将更新发送给所有与会者,如果用户不想将更新发送给所有与会者,则会发生错误。
编辑:
这是我的代码
void Application_ItemSend(object item, ref bool Cancel)
{
var form = new SC01(item);
form.Show();
Cancel = true; // prevent mail sending
}
... 在SC01形式:
private void btn_OK_Click(object sender, EventArgs e)
{
var meetingItem = _item As MeetingItem; // _item is private field of SC01
meetingItem.GetAssociatedAppointment(false).Send(); // this Send() will make sending option (to update attendees only or to all attendees
}
如果用户SHLL能够决定是否更新发送到每个人,那么你为什么不喜欢弹出窗口? – Max 2014-09-25 11:18:53
实际上,当用户点击发送按钮,然后选择发送选项,一个确认弹出窗口会出现。如果用户在这个弹出窗口上单击OK,将会调用Send()函数实际发送该项目。此时,发送选项弹出窗口再次出现,不是我想要的。 – 2014-09-25 15:43:02
如何确认弹出窗口?你的发送按钮是否已经调用发送程序或其他东西? – Max 2014-09-25 16:39:40