VSTO OUTLOOK:获取刚刚在“ to”“ BC”中输入的最后一封电子邮件地址或“ CC”新的字段,回复或向前窗口

发布于 2025-02-12 04:39:15 字数 203 浏览 1 评论 0原文

我正在尝试将最后一个收件人(电子邮件地址)引入刚刚引入“ TO”,“ BC”或“ CC”字段时。我该如何实现?

例如:

  • 如果用户只是在“到”字段中的电子邮件地址中键入我想获得的字段。
  • 如果用户只是在“ BC”字段中输入电子邮件地址,我想获得。
  • 如果用户只是在“ CC”字段中输入电子邮件地址,我想获得。

I am trying to get the last recipient (email address) just introduced into the "To", "Bc" or "Cc" fields when field loses its focus. How can I achieve this?

For example:

  • if user just types in an email address within "To" field I want to get that.
  • if user just types in an email address within "Bc" field I want to get that.
  • if user just types in an email address within "Cc" field I want to get that.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

勿挽旧人 2025-02-19 04:39:15

使用mailItem.propertychange事件。每当更改任何收件人(添加/删除)时,事件处理程序将对所有3个(TO/cc/bcc)属性发射,因此您将不知道哪一个更改。您需要先缓存旧值,当事件启动时,将其与新值进行比较。

PropertyChange ("To")
PropertyChange ("CC")
PropertyChange ("BCC")

Use MailItem.PropertyChange event. Whenever any recipient is changed (added/deleted), the event handler fires for all 3 (To/CC/BCC) properties, so your won't know which one changed. You'd need to cache the old value first, and when the event fires, compare it with new value.

PropertyChange ("To")
PropertyChange ("CC")
PropertyChange ("BCC")
小…红帽 2025-02-19 04:39:15

You can handle the MailItem.PropertyChange event which is fired when an explicit built-in property (for example, Subject) of the object is changed. The property name is passed to the event so that you can determine which property was changed.

The Recipients property returns a Recipients collection that represents all the recipients for the Outlook item. So, you could get easily get the items for the To, Cc or Bcc fields.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文