tags:

views:

596

answers:

1

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?

A: 

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.

shahkalpesh