2016-11-14 72 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

相關問題