Outlook“另存为 html”在邮件消息工具栏上
我工作的医疗公司有一个 EMR 系统,可以保存患者文件的数字副本,以便可以搜索和快速访问。出现了一个新请求,希望能够将电子邮件保存到 EMR 系统,但它不能很好地显示 .msg 文件。它确实可以很好地显示 .htm 文件,因此希望我能找到一种方法,将电子邮件以 .htm 格式保存到特定文件夹,用户只需单击一个按钮即可。
我应该考虑使用 vs 2010 制作一个插件来完成这个简单的任务吗?或者有更好的方法来做到这一点吗?
在过去的几天里,我已经探索过使用命令栏简短地制作一个加载项,但在将菜单项添加到邮件项目时遇到了许多问题,以及丢失事件处理程序或让它们多次触发,所以我'我想知道我是不是找错了树。
编辑:看看功能区栏自定义,可能需要升级一些仍在使用 2003 的用户,但看起来它可能是比命令栏更好的选择。
The medical company I work for has a EMR system setup to keep digital copies of patient files so they are searchable as well as quick to access. A new request has come through to be able to save e-mail to the EMR system, however it does not display .msg files very nicely. It does display files nicely as .htm, so was hoping i could figure out a way to save email messages to a specific folder in a .htm format with the user just hitting a single button.
Should i be looking at making an add-in using vs 2010 to do this simple task? Or would there be a better way to do this?
I've explored making an Add-In breifly over the past few days using command bars but have hit numerous problems with adding the menu item to mail items, as well as losing event handlers or having them fire quite a few times, so i'm wondering if i'm barking up the wrong tree.
Edit: Looking at ribbon bar customization as well, may have to upgrade some users that are still using 2003, but seems like it might be the better option than command bars going forward.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
功能区栏是我发现的最佳路径,但是我很难找到从头到尾项目的良好操作方法,因此我将在这里写一篇小文章。
向功能区添加一个按钮,仅用于现有邮件消息,包括该按钮的图像。
使用 VS 2010
新建Office项目,选择“Outlook 2007加载项”,输入项目名称。
在您新创建的项目中,添加一个新项目“Ribbon (XML)”,将其命名为您想要的名称,我将其称为 CustomRibbon
打开新创建的 CustomRibbon.xml 文件并将选项卡节点更改为具有以下内容。
然后,CustomRibbon.cs 文件有 2 个回调函数,一个称为 GetCustomButtonImage,另一个称为 ButtonClicked。
打开 CustomRibbon.cs 来填写此内容,在功能区回调区域中添加以下内容,
并在同一部分中添加以下内容
,然后这将显示缺少一个类,我们很快就会介绍这一点,但首先我们要添加最后一部分我们需要在 CustomRibbon.cs 中。在 IRibbonExtensibility Members 区域中,在 GetCustomUI 中更改现有代码
将其添加到顶部
将一个新类添加到您的项目中,将其命名为 AxHostConverter,使用 System.Windows.Forms ;
使用系统绘图;
然后更改类以包含以下代码
将按钮的图像添加到项目中,并更改 GetCustomButtonImage 函数以使用该资源。我使用了 PNG,并且很幸运,透明胶片显示得很好。
最后,剩下的就是将以下内容添加到 ThisAddIn.cs
将您想要的任何代码添加到 ButtonClicked 中,然后就完成了。
使用 Clickonce 进行部署,安装相当简单。
Ribbon bar was the best path i found, however i had trouble finding a great how-to for the start-to-finish project, so i'll make a small write up here.
To add a button to the ribbon for only existing mail messages including a image for the button.
Using VS 2010
New project, Office, select "Outlook 2007 add in", enter a name for your project.
To your newly created project, Add a new item "Ribbon (XML)" name it however you want, i'll call it CustomRibbon
open your newly created CustomRibbon.xml file and change the tab node to have the following
This then has 2 callback functions to the CustomRibbon.cs file, one called GetCustomButtonImage, the other ButtonClicked.
open CustomRibbon.cs to fill this in, in the Ribbon Callbacks region add the following
also add the following in the same section
this will then show there is a class missing, we'll get to that shortly, but first we are going to add in the last part we need in CustomRibbon.cs. In the IRibbonExtensibility Members region, in GetCustomUI change the existing code
Add a new class to your project call it AxHostConverter, add add this to the top
using System.Windows.Forms;
using System.Drawing;
Then change the class to have the following code
Add your image for your button to the project, and change the GetCustomButtonImage function to use that resource. I used a PNG and had good luck with transparencies displaying well.
And finally, all that should be left is to add the following to ThisAddIn.cs
Add whatever code you are wanting to ButtonClicked and you are set.
Deploy using Clickonce and installation is fairly straightforward.