简体   繁体   English

Outlook 2010加载项将事件绑定到选项卡选择

[英]Outlook 2010 addin bind event to tab selection

I need to develop an Outlook 2010 add-in and I am new to Visual Studio and C#. 我需要开发一个Outlook 2010加载项,并且是Visual Studio和C#的新手。 I am using Visual Studio 2010 and I've created a project using built-in Outlook 2010 add-in template. 我正在使用Visual Studio 2010,并且已经使用内置的Outlook 2010加载项模板创建了一个项目。 I've created a new ribbon and I would like to trigger an event handler when a user selects the ribbon tab. 我创建了一个新的功能区,当用户选择功能区选项卡时,我想触发一个事件处理程序。 Is that possible? 那可能吗? If yes, then what objects and what events should I use? 如果是,那我应该使用哪些对象和什么事件? I'd like to have some guidelines on what to do, like a sequence of instructions, 'cause I don't know where to start, really. 我想要一些操作准则,例如一系列说明,因为我真的不知道从哪里开始。

Well first of i can help you there but step by step i can suggest a few links that have tutorials on doing this. 好吧,首先我可以为您提供帮助,但逐步地,我可以建议一些链接,其中包含有关此操作的教程。 But to answer if you can trigger an event if you select the ribbon tab, yes this can be done in C# its usually .focus event. 但是要回答如果您选择功能区选项卡是否可以触发事件,可以用C#通常的.focus事件来完成。 First of lets say the code might be like this your ribbon name lets say is 首先让我们说代码可能像这样,您的功能区名称可以说是

  Ribbon ribbon1=new ribbon();
 if(ribbon.focus()==true)
 {
   messagebox.show();
   }

well i hope u get the idea these are the links that you 'might' :-) have missed http://msdn.microsoft.com/en-us/library/bb226712%28v=office.12%29.aspx 好吧,我希望您能想到这些是您“可能”使用的链接:-)错过了http://msdn.microsoft.com/zh-cn/library/bb226712%28v=office.12%29.aspx

http://msdn.microsoft.com/en-us/magazine/cc163403.aspx http://msdn.microsoft.com/zh-CN/magazine/cc163403.aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM