Article ID: 2555352
This article describes an All-In-One Code Framework sample that is available for download. The code sample demonstrates how to develop a Microsoft OneNote 2010 COM add-in application that implements the IRibbonExtensibility interface. The add-in application supports to customize the ribbon by implementing the IRibbonExtensibility interface. This code sample also introduces how to use the OneNote 2010 object model .
Collapse this imageExpand this image
Download informationTo download this code sample, click one of the following links:
Create a shared add-in application for OneNote 2010Because Shared Add-in Wizard does not contain a Microsoft OneNote option, to create a shared add-in application for OneNote 2010, follow these steps:
Inherit the IDTExtensibility interface to custom the ribbon control for OneNoteTo custom the ribbon control for OneNote, run the following code to make the connect class inherit the IRibbonExtensibility interface, and then implement the GetCustomUI method:
Custom icon and implement features of buttons for the ribbon controlRun the following code to implement the OnGetImage and ShowForm methods in the customUI.xml file:
Use the OneNote 2010 object model to get the title for an OneNote pageAdd Microsoft OneNote 14.0 Object Library reference, and then set the Embed Interop Type property to False:
Technology categoryOffice development
LanguagesThis code sample is available in the following programming languages:
Collapse this tableExpand this table
PrerequisitesTo run this code sample, you must install the following products:
ReferencesFor more information about COM add-in applications to modify User Interface, visit the following MSDN website:
General information about COM AddIns to modify User InterfaceFor more information about compatibility issues for OneNote 2010 and for Visual Studio2010, visit the following MSDN blog:
General information about compatibility issues for OneNote 2010 and for Visual Studio 2010For more information about how to create OneNote 2010 COM add-in applications, visit the following Microsoft websites:
What is All-In-One Code Framework?
All-In-One Code Framework shows most Microsoft development techniques by using code samples in different programming languages. Each example is carefully selected, composed, and documented to show one common code scenario. For more information about All-In-One Code Framework, visit the following Microsoft website:
How to find more All-In-One Code Framework samplesTo find more All-In-One Code Framework samples, search for "kbcodefx" together with related keywords on the Microsoft support Web site. Or, visit the following Microsoft website:
All-In-One Code Framework samples
Rapid publishing disclaimerMicrosoft corporation and/or its respective suppliers make no representations about the suitability, reliability, or accuracy of the information and related graphics contained herein. All such information and related graphics are provided "as is" without warranty of any kind. Microsoft and/or its respective suppliers hereby disclaim all warranties and conditions with regard to this information and related graphics, including all implied warranties and conditions of merchantability, fitness for a particular purpose, workmanlike effort, title and non-infringement. You specifically agree that in no event shall Microsoft and/or its suppliers be liable for any direct, indirect, punitive, incidental, special, consequential damages or any damages whatsoever including, without limitation, damages for loss of use, data or profits, arising out of or in any way connected with the use of or inability to use the information and related graphics contained herein, whether based on contract, tort, negligence, strict liability or otherwise, even if Microsoft or any of its suppliers has been advised of the possibility of damages.
(http://go.microsoft.com/fwlink/?LinkId=151500)for other considerations.