Save Email Upon Send in Outlook Add-In

后端 未结 1 1593
情书的邮戳
情书的邮戳 2021-01-22 01:33

I\'m making an Outlook Add-in (Visual Studio 2010, .NET 4.0, C#), and I would like to automatically archive a user\'s email after they send it. What I have so far is the followi

相关标签:
1条回答
  • 2021-01-22 02:03

    you can try with this code

    private void saveEmail(object Item, ref bool Cancel)
    {
             var msg = Item as Outlook.MailItem;
             msg.SaveAs(yourPath, Outlook.OlSaveAsType.olMSG);
    }
    
    0 讨论(0)
提交回复
热议问题