发布于 2017-05-07 14:06:17
使用高级日历服务,这是可能的。创建Google脚本文件和启用高级日历服务。
然后创建一个像这样的函数:
function createEventWithFlair() {
var calendarId = "Enter calendarID here"
var title = "Enter a title here"
var location = "Enter a location here"
var description = "Enter a description <b>here</b>" // simple html (<a><b>) is allowed
var startTime = "Sat May 26 23:59:59 GMT+02:00 2017" // must be an ISO-string ==> var date = new Date().toISOString();
var endTime = "Sun May 27 23:59:59 GMT+02:00 2017"
var gadget = {}
gadget.display = "chip" //Change to "icon" if you only want an icon to appear in the Google Calendar
gadget.iconLink = "https://gamesrfunny.weebly.com/uploads/9/5/5/8/9558194/bird-blue.ico" //Link to ico-file.
gadget.height = 20
gadget.width = 20
gadget.type = 'image/ico'
var event = {
summary: title,
location: location,
description:description,
start: {
dateTime: startTime
},
end: {
dateTime: endTime
},
attendees: guests,
// Red background. Use Calendar.Colors.get() for the full list.
colorId: 11,
gadget: gadget,
};
var event = Calendar.Events.insert(event, calendarId);
Logger.log(event.htmlLink)
}属性的完整列表可以在资源表示页面中读取。
发布于 2014-08-14 14:02:57
不提供对事件图标的本地支持,API或Apps脚本也是如此。
https://stackoverflow.com/questions/25272737
复制相似问题