问题
I've got a minimal VSTO Addin for Outlook 2010 with a ribbon. My only goal is to display a ribbon (created via designer) with no functionality. From what little I can tell from MSDN ribbons should just automatically be displayed by default, perhaps with tweaking ControlIdType/CustomId properties for tabs.
Alas, tweaking these properties does nothing -- Outlook loads and displays no tab. A simple message box displayed in the ribbon loader reveals it never is triggered. Additionally, I haven't seen any information resources (tutorials, walkthroughs, overviews, etc..) that say anything about needing to manually tell Outlook to display tabs.
- How do I get the tabs displayed?
- Is there a good resource other than MSDN that's good for VSTO newbies?
回答1:
To get your ribbon displayed, on the base ribbon in your code change the RibbonType
property to be Microsoft.Outlook.Explorer
.
回答2:
What fixed it for me (without starting a new project), in the Ribbon1.vb ribbon design, I clicked on the the Ribbon1 name above the ribbons 'File' button, in the properties pane, clicked on tabs (collection), under the heading 'Design' I changed the name (from Tab1) to something else.
Clicked ok, tested by clicking F5 and it worked. Hope this helps someone else.
来源:https://stackoverflow.com/questions/9300526/custom-ribbon-in-vsto-addin-for-outlook-2010-doesnt-display