0

I want to create Add-in for outlook 2010, that will open TFS work items link directly in Visual Studio Team Explorer...but I can't find enough information on how to accomplish this relatively simple task.

Currently I found how to create a simple Outlook 2010 add-in and how to connect to "NewMail Inspector". But how I can force the links to our TFS server to open in Visual Studio and not in browser?

I thought just to catch click event on link inside mail and check if it's authority points to TFS, but it looks like it's impossible to catch click event.

Then I thought that I can parse incoming/existing mails and replace link with my custom URI scheme, then to use simple CMD application to open the VS, but I can't find how to parse currently active mail...the active mail can be in preview pane or mail can be opened...

Does anybody have ideas how to do this?

4

1 回答 1

0

我不熟悉 TFS,但听起来你已经可以处理那部分了。大概有某种命令行选项可以在那里工作。听起来问题在于检测链接,并首先触发您的代码。

在资源管理器(Outlook 的主窗口)中选择的活动项目可从资源管理器的选择属性中获得。您可以采用与 Inspector 基本相同的方式来获取 Explorer 事件——您想要的是 SelectionChange。对于 Inspector,您可以从 Inspector 获取当前项目。当前项目。获得该项目后,检查它是否为 MailItem、强制转换并使用 Body 属性。

您还可以在检查器/资源管理器的功能区中添加一个按钮,并使用它而不是更改消息本身。单击时,检查项目的正文以获取预期形式的链接,然后运行您的代码。这里有关于创建和使用功能区的信息。

于 2013-07-18T18:28:23.847 回答