我试过了以下运行良好的代码,但它仅将提醒发送到执行脚本的计算机的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 = '[email protected]';
objAppointment.Recipients.Add('[email protected]');
objAppointment.Start = appDate;
var duration = 2;
objAppointment.ReminderMinutesBeforeStart = 60 * 24 * 7;
objAppointment.Duration = duration;
objAppointment.Save();
objAppointment.Send();
最佳答案
到底什么不起作用?如果要发送会议请求,请在添加收件人后呼叫AppointmentItem.Send
。