我想使用 ActiveX 設置 Outlook 約會。以下代碼正在運行。除了我設置時區的部分。我似乎無法找到如何設置。是否有任何 API 參考可用于設置時區? var sub = "Test"; var stDate = "01-01-2020"; var endDate = "01-01-2020"; var sBody1 = "....."; var sBody2 = "hello "; var sBody3 = ".....world"; if (confirm("Are you sure that you want to send an outlook invite for the meeting? Click OK to send invite.")) { try { outlookApp = new ActiveXObject("outlook.application"); } catch (Error) { alert("Please verify if your browser is enabled to run ActiveX scripts and try again!"); return false; } try { nameSpace = outlookApp.getNameSpace("MAPI"); mailFolder = nameSpace.getDefaultFolder(6); mailItem = mailFolder.Items.Add("IPM.Appointment.ConfRmReq"); mailItem.MeetingStatus = 1; mailItem.Subject = sub; mailItem.Start = stDate; mailItem.End = endDate; mailItem.TimeZones = ["Eastern Standard Time"]; //var tzEastern = tzs["Eastern Standard Time"]; mailItem.StartTimeZone = tzEastern; mailItem.EndTimeZone = tzEastern; var sBody = sBody1; mailItem.Body = sBody; sEmailList.push('Email Address'); mailItem.RequiredAttendees = sEmailList.join(';'); mailItem.Display();
使用 ActiveX 的 Outlook 約會
精慕HU
2022-01-01 20:04:36