更新时间:2023-02-13 10:21:59
Hello Pranav,
VSTO提供了两种创建自定义UI(Fluent UI)的主要方法:
我你的控件的回调,你可以pa修改用于创建新MailItem对象的代码。
显示MailItem类的方法di 展开新的 检查员 对象为物品
。您可以在以下系列文章中阅读有关Fluent UI(又名Ribbon UI)的更多信息:
为开发人员自定义2007 Office Fluent功能区(第1部分,共3部分)
为开发人员自定义2007 Office Fluent功能区(第2部分,共3部分)
为开发人员自定义2007 Office Fluent功能区(第3部分,共3部分)
如果您需要更换内置控件操作,可以考虑重新调整内置控件,请参阅 Office Fluent
功能区上的临时重新调整命令 以获取更多信息。
Hi,
I am looking to create a few ribbons in C# using VSTO which when pressed creates a new email object with predefined recipient address. I am able to create a custom email in the add in but this just replaces the existing create new email button in Outlook.
How do I ensure that these custom create new email buttons are added to the ribbons created?
Any help would be appreciated, I have followed these links so far
https://msdn.microsoft.com/en-us/library/ms269113.aspx
https://msdn.microsoft.com/en-us/library/bb386104.aspx
Thanks
Pranav
Hello Pranav,
VSTO provides two main ways for creating a custom UI (Fluent UI):
1. Walkthrough: Creating a Custom Tab by Using the Ribbon Designer
2. Walkthrough: Creating a Custom Tab by Using Ribbon XML
In the callback of your controls, you may paste the code for creating a new MailItem object. The Display method of the MailItem class displays a new Inspector object for the item.
You can read more about the Fluent UI (aka Ribbon UI) in the following series of articles:
Customizing the 2007 Office Fluent Ribbon for Developers (Part 1 of 3)
Customizing the 2007 Office Fluent Ribbon for Developers (Part 2 of 3)
Customizing the 2007 Office Fluent Ribbon for Developers (Part 3 of 3)
In case you need to replace the built-in control action, you may consider repurposing built-in controls, see Temporarily Repurpose Commands on the Office Fluent Ribbon for more information.