Javascript:如何通过按钮将事件添加到 Outlook 日历

标签 javascript sharepoint outlook

我目前编写了一个可用的 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>

来源:msdn.microsoft.com

关于Javascript:如何通过按钮将事件添加到 Outlook 日历,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6049814/

相关文章:

javascript - OnClick 通过映射未触及父级

javascript - 视频播放时停止 bxslider

javascript - Sharepoint 2013 控件显示模板 : how to know how many items we'll get

excel - 获取未保存文件的完整路径以附加到 Outlook 邮件

sql - 从 SQL Management Studio 捕获输出并将其粘贴到 Outlook 电子邮件中的最佳方法是什么?

javascript - react JS。将元素附加到 DOM

php - 检查表单提交时是否存在用户名

具有查找字段的 SharePoint 列表项 - 移动/复制到不同的网站集

c# - 如何将 PDF 查看器面板添加到 Sharepoint WebPart

vba - 无法发送多个 Outlook 邮件