【问题标题】:Outlook-addin Modify Reminder value of an appointmentOutlook-addin 修改约会的提醒值
【发布时间】:2016-04-27 13:45:12
【问题描述】:

我正在开发一个 Outlook 插件,目的是创建一个具有不同属性的约会。

是否可以使用邮箱 API 修改提醒字段的值?我在文档 (https://dev.outlook.com/reference/add-ins/) 中找不到这样做的方法。

【问题讨论】:

  • 考虑将答案标记为已接受?

标签: outlook outlook-addin office365api office365-apps outlook-web-addins


【解决方案1】:

当 Office.js api 无法用于 Outlook 加载项时,您可以尝试使用 Exchange Web 服务 (EWS) 来执行操作

看看this previous answer

this answer 中,我为两者(客户端或服务器端方法)提供了代码 sn-ps。

【讨论】:

    【解决方案2】:

    您可以使用UpdateItem EWS 操作使用mailbox.makeEwsRequestAsync 方法设置标志和提醒字段:

    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"               xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"               xmlns:xsd="http://www.w3.org/2001/XMLSchema"               xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"               xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
      <soap:Header>
        <RequestServerVersion Version="Exchange2013" xmlns="http://schemas.microsoft.com/exchange/services/2006/types" soap:mustUnderstand="0" />
      </soap:Header>
      <soap:Body>
        <m:UpdateItem MessageDisposition="SaveOnly" ConflictResolution="AlwaysOverwrite">
          <m:ItemChanges>
            <t:ItemChange>
              <t:ItemId Id="AAMkAGUzNmEzYTBmLTI1NDItNGE0My1iZDk5LWFkMDgxODI3YWNlOQBGAAAAAACK2VEhi72QSaw+u0XV7xUHBwCMotTyA3QkQ7TPAmcrRt4FAAAALwVDAAAuH/1UA8tzTYD5jbYriaIUAAJEgGbPAAA=" />
              <t:Updates>
                <t:SetItemField>
                  <t:FieldURI FieldURI="item:Flag" />
                  <t:Message>
                    <t:Flag>
                      <t:FlagStatus>Flagged</t:FlagStatus>
                      <t:StartDate>2016-02-24T00:00:00.000Z</t:StartDate>
                      <t:DueDate>2016-02-24T00:00:00.000Z</t:DueDate>
                    </t:Flag>
                  </t:Message>
                </t:SetItemField>
                <t:SetItemField>
                  <t:FieldURI FieldURI="item:ReminderDueBy" />
                  <t:Message>
                    <t:ReminderDueBy>2016-02-24T15:00:00.000Z</t:ReminderDueBy>
                  </t:Message>
                </t:SetItemField>
                <t:SetItemField>
                  <t:FieldURI FieldURI="item:ReminderIsSet" />
                  <t:Message>
                    <t:ReminderIsSet>true</t:ReminderIsSet>
                  </t:Message>
                </t:SetItemField>
                <t:SetItemField>
                  <t:FieldURI FieldURI="item:ReminderMinutesBeforeStart" />
                  <t:Message>
                    <t:ReminderMinutesBeforeStart>0</t:ReminderMinutesBeforeStart>
                  </t:Message>
                </t:SetItemField>
              </t:Updates>
            </t:ItemChange>
          </m:ItemChanges>
        </m:UpdateItem>
      </soap:Body>
    </soap:Envelope>

    【讨论】:

      【解决方案3】:

      截至今天(要求集 1.3)我认为 Office.js 中没有一种方法可以让您获取或设置约会的提醒字段。其他人已经提到您可以尝试使用 EWS 调用来执行操作。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2010-10-14
        • 1970-01-01
        • 2016-05-15
        相关资源
        最近更新 更多