是否可以在Outlook约会中添加收件人并向与会者发送邀请?



我已经尝试了下面的代码,它工作得很好,但它只将提醒发送到执行脚本的计算机的Outlook。

// create outlook object
var objOutlook = new ActiveXObject( "Outlook.Application" );
var olAppointmentItem = 1; //fixed for different properties of outlook object
var objAppointment = objOutlook.CreateItem(olAppointmentItem);
objAppointment.ReminderSet = true;
objAppointment.Categories = 'Yellow Category';
objAppointment.Subject = subject;
objAppointment.Location = 'My Location';
objAppointment.RequiredAttendees = 'test@test.com';
objAppointment.Recipients.Add('test@test.com');
objAppointment.Start = appDate;
var duration = 2;
objAppointment.ReminderMinutesBeforeStart = 60 * 24 * 7; 
objAppointment.Duration = duration; 
objAppointment.Save();
objAppointment.Send();

到底是什么不工作?如果需要发送会议请求,请在添加收件人后呼叫AppointmentItem.Send

最新更新