如何从 Outlook 2007 插件获取 .msg 文件的位置/完整路径属性

发布于 2024-12-25 03:30:22 字数 516 浏览 1 评论 0原文

我从“我的文档”中打开 .msg 文件,我需要获取 .msg 文件的位置/完整路径。

我这里有一段代码来捕获 MailItem 打开事件,但我不知道下一步要做什么来获取 .msg 文件的位置或完整路径

class MailItemHelper
{
    Outlook.MailItem _MailItem = null;

    public MailItemHelper(Outlook.MailItem mailItem)
    {
        _MailItem = mailItem;
        ((ItemEvents_10_Event)_MailItem).Open += new ItemEvents_10_OpenEventHandler(MailItemHelper_Open);
    }

    void MailItemHelper_Open(ref bool Cancel)
    {
        string msgPath = _MailItem.???
    }
}

问候

I open the .msg file from My Documents and i need to get the location/fullpath of the .msg file.

I have a piece of code here to capture the MailItem open event but I don't know what to do next to get the location or fullpath of the .msg file

class MailItemHelper
{
    Outlook.MailItem _MailItem = null;

    public MailItemHelper(Outlook.MailItem mailItem)
    {
        _MailItem = mailItem;
        ((ItemEvents_10_Event)_MailItem).Open += new ItemEvents_10_OpenEventHandler(MailItemHelper_Open);
    }

    void MailItemHelper_Open(ref bool Cancel)
    {
        string msgPath = _MailItem.???
    }
}

Regards

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文