如何在VB.NET中的Outlook邮件中包含投票按钮 [英] How to include Voting Button in Outlook Mail in VB.NET

查看:218
本文介绍了如何在VB.NET中的Outlook邮件中包含投票按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对VB很新,我已经创建了一封电子邮件,发送给从示例中以vb编码的收件人; 如何:以编程方式创建电子邮件项目

  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 =这是主题;
mailItem.To =someone@example.com;
mailItem.Body =这是消息。;
mailItem.Importance = Outlook.OlImportance.olImportanceLow;
mailItem.Display(false);
}

此外,我简要回顾了今天的Outlook MAPI参考,因为它在我的办公室,但我对如何继续操作感到困惑。



我要包括在电子邮件中的是一个投票按钮,例如批准/拒绝,以便我可以过滤收到的电子邮件基于批准:blabla的收件人使用MAPI。



PS Outlook将以批准:blasddd或拒绝: hjjkkkk。请求任何建议将不胜感激。

解决方案

您需要使用 MailItem.VotingOptions 属性。请参阅 https://msdn.microsoft.com/en-us/library/ office / ff424466.aspx


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.

解决方案

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

这篇关于如何在VB.NET中的Outlook邮件中包含投票按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆