How to include Voting Button in Outlook Mail in VB.NET

别等时光非礼了梦想. 提交于 2019-12-12 05:38:32

问题


I'm fairly new to VB and I have created an email to be sent to a recipient which is coded in vb from the example; How to: Programmatically Create an E-Mail Item

  private void ThisAddIn_Startup(object sender, System.EventArgs e)
    {
        CreateMailItem();
    }

    private void CreateMailItem()
    {
        Outlook.MailItem mailItem = (Outlook.MailItem)
            this.Application.CreateItem(Outlook.OlItemType.olMailItem);
        mailItem.Subject = "This is the subject";
        mailItem.To = "someone@example.com";
        mailItem.Body = "This is the message.";
        mailItem.Importance = Outlook.OlImportance.olImportanceLow;
        mailItem.Display(false);
    }

Furthermore, I briefly looked at the Outlook MAPI refrence today since it's used in my office but I'm confused on how to proceed.

What I want to include in the email is a voting button e.g Approve/Reject so I can filter the received email from the Recipient based on the subject "Approve: blabla" using the MAPI .

P.S Outlook gives the subject title of the response in either "Approve:blasddd" or "Reject:hjjkkkk" . Please any suggestion will be greatly appreciated.


回答1:


You need to use the MailItem.VotingOptions property. See https://msdn.microsoft.com/en-us/library/office/ff424466.aspx



来源:https://stackoverflow.com/questions/38839914/how-to-include-voting-button-in-outlook-mail-in-vb-net

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