2016-11-14 36 views
1

我对以下代码工作正常,但它仅将提醒发送到执行脚本的计算机的Outlook。JavaScript - 是否可以在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(); 

回答

0

什么是不工作?如果您想发送会议请求,请在添加收件人后致电AppointmentItem.Send

+0

我还想邀请约会的与会者接受邀请 – user2242558

+0

使用Recipients.Add添加的每个与会者都将收到邀请。 –

+0

再次无法将邀请发送给与会者......我赞扬了代码!看到我的变化,并让我知道,如果你可以找到我的错误..我的脚本正在工作,并在当地aoutlook创建会议,但问题是,不能发送邀请给与会者...... – user2242558

相关问题