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

时间:2016-11-14 08:48:05

标签: javascript 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();

1 个答案:

答案 0 :(得分:0)

究竟什么不起作用?如果要发送会议请求,请在添加收件人后致电AppointmentItem.Send