Creating Outlook Voting button and tracking response in C#?

狂风中的少年 提交于 2021-01-28 23:44:29

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/692221/creating-outlook-voting-button-and-tracking-response-in-c

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!