如何从 Outlook 加载项中存储和检索特定数据?

huangapple go评论47阅读模式
英文:

How to store and retrieve specific data from outlook add-in?

问题

Outlook增加包含一个文本框,用户可以输入任何信息。我想存储这些信息,并在用户每次使用增加时检索它。也就是说,用户输入的信息必须在他们以后使用增加时保留。

我尝试使用EWS或REST获取自定义属性,但我不知道如何利用它,或者这种方法是否正确。

英文:

The outlook add-in contains a textbox where a user can enter any information. I want to store this information and retrieve it every time the user uses the add-in. As in, the information entered by the user must be retained for the following times they use the add-in.

I tried to get custom properties using EWS or REST, but I am not aware of how to utilize this or if this approach is the correct one.

答案1

得分: 1

根据您的描述,目前不清楚是否会在Outlook中使用文本框控件来显示每个邮箱或特定项目的数据。根据情况,您可以选择最适合存储自定义数据的位置。您可以通过以下两种方式来管理Outlook附加组件中的自定义数据:

  • Roaming settings - 用于管理用户邮箱的自定义数据。
  • Custom properties - 用于管理用户邮箱中项目的自定义数据。

这两种方法都提供了访问仅由您的Outlook附加组件访问的自定义数据的方式,但每种方法都会将数据分开存储。也就是说,通过Roaming settings存储的数据无法通过custom properties访问,反之亦然。Roaming settings存储在用户的邮箱上,而custom properties存储在消息或约会中。存储的数据可以在支持附加组件的所有设备上的后续Outlook会话中访问。请在获取并设置Outlook附加组件的元数据文章中了解更多信息。

英文:

It is not clear from your description whether a text box control will be used for displaying data per mailbox or specific item in Outlook. Depending on that you may choose the best place for keeping your custom data. You can manage custom data in your Outlook add-in by using either of the following:

  • Roaming settings - which manage custom data for a user's mailbox.
  • Custom properties - which manage custom data for an item in a user's mailbox.

Both of these give access to custom data that's only accessible by your Outlook add-in, but each method stores the data separately from the other. That is, the data stored through roaming settings isn't accessible by custom properties, and vice versa. Roaming settings are stored on the user's mailbox while custom properties are stored on a message or appointment. Stored data is accessible in subsequent Outlook sessions on all the form factors that the add-in supports. Read more about that in the Get and set add-in metadata for an Outlook add-in article.

huangapple
  • 本文由 发表于 2023年6月6日 13:07:41
  • 转载请务必保留本文链接:https://go.coder-hub.com/76411577.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定