从outlook中保存邮件 [英] saving mail from outlook

查看:67
本文介绍了从outlook中保存邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好。我是COM / ATL开发的新手。我使用本教程作为主要信息源,为Outlook 2010构建了一个COM加载项。 http://msdn.microsoft.com/en-us/library/ee941475%28v=office.14%29.aspx。

Hi. I'm new to COM/ATL development . I've build a COM add-in for Outlook 2010, using this tutorial as main source of information. http://msdn.microsoft.com/en-us/library/ee941475%28v=office.14%29.aspx.

当我点击一个按钮(我特意签名)时,我想在一个文本文件中保存电子邮件(收件箱中的所有邮件)。有人可以给我一个想法,我该怎么做?任何代码片段(用C ++编写)都会很棒。

When I click a button(that I specifically asign) , I want to save the body of emails(all the mails from inbox) in a text file . Can somebody give me an ideea how do i that? Any code snippet( in C++ ) would be great.

提前致谢。

编辑:

我写了一小段代码来获取收件箱中的电子邮件数量。现在我只需要收到电子邮件。我有什么建议吗?

i wrote a small piece of code to get the number of emails from inbox. Now i just need to get the body of emails . Any suggestion how i do that?

         _ApplicationPtr pApp;



         _NameSpacePtr pNamespace;

         pApp-> GetNamespace(L" MAPI");

         MAPIFolderPtr InboxFolder = pNamespace-> GetDefaultFolder(olFolderInbox);

         _ItemsPtr mails = InboxFolder-> Items;

         const long count = mails-> GetCount();



   &NBSP;&NBSP;&NBSP;   for(long i = 1; i< = count; i ++)

         _ApplicationPtr pApp;

        _NameSpacePtr pNamespace;
        pApp->GetNamespace(L"MAPI");
        MAPIFolderPtr InboxFolder = pNamespace->GetDefaultFolder(olFolderInbox);
        _ItemsPtr mails = InboxFolder->Items;
        const long count = mails->GetCount();

        for(long i=1;i<=count;i++)

          {

          {

          }

          }

推荐答案

我搬了这个案子至
的展望
开发者论坛以获得更好的回应。

I moved this case to outlook for developers forum for better response.

感谢您的理解!

祝你好运,

Sunny

Sunny


这篇关于从outlook中保存邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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