在窗体内的Outlook中打开mailItem [英] Opening a mailItem in Outlook inside a Form

查看:98
本文介绍了在窗体内的Outlook中打开mailItem的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在Outlook中打开一个邮件项目,该邮件项目应该位于Windows窗体内(例如窗体中的面板).

该邮件不应作为其他Outlook窗口打开,而应位于System.Windows.Form中.

请向我提出一些想法.

I need to open a mail item in outlook which should be come inside windows Form (say a panel in the form).

The mail message should not be opened as another outlook window, it should be come inside the System.Windows.Form.

Please suggest me some ideas

推荐答案

将Outlook作为整个应用程序进行重新父级化非常棘手,更不用说确保最终用户已安装Outlook的问题了,正确的版本.

当您说要从Outlook打开项目时,是否表示您正在编写某种在Outlook内部运行的加载项?

如果仅在单独的应用程序中显示消息,则建议使用Outlook Automation对象将消息另存为MHTML文件在temp文件夹中,然后在WebBrowser控件中显示该文件.实际上,这可能是您必须在外接程序中采用的方法,因为我看不到您能够获得窗口句柄,即使可以,它也不会在Office 2007中重新父级化,如果您幸运的话,可以使用Outlook的早期版本.
Re-parenting Outlook as a whole application is tricky enough, not to mention the problem of ensuring your end users have outlook installed, and the correct version.

When you say you are opening the item from outlook, do you mean you are writing some sort of addin that runs inside of outlook?

If you are merely displaying the message inside a separate application I would suggest using the Outlook Automation objects to save the message as an MHTML file in a temp folder, then displaying that file in a WebBrowser control. in fact that is probably the route you would have to take in an addin, as I can''t see you being able to get the window handle, and even if you can then it just won''t re-parent in Office 2007, earlier versions of outlook may work if you are lucky.


这篇关于在窗体内的Outlook中打开mailItem的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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