本文介绍了在 C# 中创建 Outlook 投票按钮和跟踪响应?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 C# 2.0 我想:

  1. 在 Outlook 邮件消息中添加投票按钮并发送.
  2. 跟踪响应.

我可以看到一些参考资料来阅读邮件内容,因此可以进行跟踪,但是如何实现投票按钮?

解决方案

您必须将此 VB 代码翻译成 c#

ActiveInspector.CurrentItem.VotingOptions = "Yes;No;Maybe"

为了进行跟踪,您必须参考随投票选项一起发送的电子邮件.

对于 i = 1 到 ActiveInspector.CurrentItem.Recipients.Count如果 ActiveInspector.CurrentItem.TrackingStatus = olTrackingReplied 那么debug.Print ActiveInspector.CurrentItem.Recipients(i).AutoResponse万一下一个

这里,ActiveInspector.CurrentItem 指的是随投票按钮一起发送的 MailItem 实例.您可以通过使用引用 ActiveInspector.CurrentItem 的变量来优化此代码,并在代码中使用该变量.

Using C# 2.0 I would like to:

  1. Add voting button in Outlook mail message and send.
  2. Track the response.

I can see some reference material to read the mail content so may be tracking will be possible, but how do I achieve a voting button?

解决方案

You will have to translate this VB code into c#

ActiveInspector.CurrentItem.VotingOptions = "Yes;No;Maybe"

In order to track, you will have to get reference to the email that was sent with Voting options.


for i = 1 to ActiveInspector.CurrentItem.Recipients.Count
    if ActiveInspector.CurrentItem.TrackingStatus = olTrackingReplied then
        debug.Print ActiveInspector.CurrentItem.Recipients(i).AutoResponse 
    endif
next

EDIT: Here, ActiveInspector.CurrentItem refers to the MailItem instance that was sent alongwith Voting buttons. You can optimize this code by having a variable which refers to the ActiveInspector.CurrentItem and use the variable in the code instead.

这篇关于在 C# 中创建 Outlook 投票按钮和跟踪响应?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-15 08:21