我目前编写了一个可用的 vbscript 实现:
<code>
<script language="VBScript">
<!--
sub MakeAppointment(MySubject, MyLocation, MyStart, MyEnd, MyMessage)
Dim objOutlook
Dim itmCalendar
Set objOutlook = CreateObject("Outlook.application")
Set itmCalendar = objOutlook.CreateItem(1)
itmCalendar.Subject = MySubject
itmCalendar.Location = MyLocation
itmCalendar.Start = MyStart
itmCalendar.End = MyEnd
itmCalendar.Body = MyMessage
itmCalendar.Save
Msgbox "Appointment has been added to your Outlook Calendar!", 0, MyStart
Set itmCalendar = Nothing
Set objOutlook = Nothing
end sub
-->
</script>
<script language="VBScript">
<!--
Sub btnAdd_onclick()
MySubject="All your base are belong to us"
MyLocation="Japan"
MyStart="05/19/2011 07:00"
MyEnd="05/19/2011 08:00"
MyMessage = "This is a English review course." & vbcrlf
MyMessage = MyMessage & "" & vbcrlf
MyMessage = MyMessage & "" & vbcrlf
MyMessage = MyMessage & "" & vbcrlf
MakeAppointment MySubject, MyLocation, MyStart, MyEnd, MyMessage
End Sub
-->
</script>
</code>
我需要一些关于如何为 Javascript 重写此内容的帮助,因为我正在编写的另一个 SharePoint 网站正在使用 Javascript 作为其默认验证脚本语言。有可能吗?有任何可能的资源链接来完成此任务吗?
最佳答案
接受的答案对我没有帮助。因此,我将发布截至 2015 年 12 月我认为有用的内容。
http://calendar.live.com/calendar/calendar.aspx?rru=addevent
参数:
dtstart (yyyymmddThhmmss)
Required. Specifies the event's start date and time. For example, 20110101T120000 represents January 1, 2011, at noon. Note that the portion specifying the event time (T120000) is optional.
dtend (yyyymmddThhmmss)
Required. Specifies the event's end date and time. For example, 20110101T120000 represents January 1, 2011, at noon. Note that the portion specifying the event time (T120000) is optional.
摘要(转义字符串)
Optional. Specifies the event's title.
位置(转义字符串)
Optional. Specifies the event’s location text.
<a href="http://calendar.live.com/calendar/calendar.aspx?rru=addevent&dtstart=2015-12-07T20:00:00+00:00&dtend=2015-12-07T22:00:00+00:00&summary=Weekly Planning&location=BigCoHQ">Add to Outlook</a>
关于Javascript:如何通过按钮将事件添加到 Outlook 日历,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6049814/