New Vanilla COM Add-In Sample for OneNote

Hi, Jay here from the OneNote Integrations team.

Did you know that the OneNote desktop version on Windows has an interface for extensibility? Popular utilities like Onetastic were implemented using this interface. Using this, you can develop and install your own COM add-ins which would then show up on the OneNote ribbon.

There are a few samples and sites out there out there describing how to create such an add-in, but oftentimes there are many error-prone steps involved.  To help people get started creating such add-ins, we've created a sample to help folks get bootstrapped.  You can find it on GitHub here.

In short, you just need to take the sample, rename a couple of files, and replace a few strings, and then you're ready to go :).

This is still a work in progress, feel free to let us know of any bugs (or do a pull request 🙂 ).


Comments (7)

  1. Jens says:

    Would love to see an update to this particularly with regard to debugging. I’ve had this, and my own, COM add-ins work fine in OneNote and then, for one reason or another, just stop working after making changes that should have no bearing on whether it installs or not. Sometimes they show in OneNote as failed to load, sometimes there’s absolutely nothing there. Either way, without being able to attach a VS process to trace working code, it’s next to impossible to debug a COM add-in that won’t initialize in OneNote.

    Onetastic clearly doesn’t use the same method in its creation as it can be loaded directly as a DLL and doesn’t require the shim process of running hosted.

    Could we get a follow up article?

  2. Hello Jay, i came across some problems when use winform with onenote, and I really need your help.
    I want switch between winform and onenote, so I use method to run my mainform,
    I know when you use or to start the form, it will be switchable.
    But in this case, it can’t. I can’t edit onenote-page when the mainform is showed. I tried to look for some information in msdn and got nothing.
    I think it maybe related to the add-in mode.
    Sorry for my bad english. thx.

  3. Alex says:

    Hi again Jay,

    I started to use this project with Visual Studio 2015. I have never used Visual Studio before, and the directions in the repo are just too fuzzy for a Visual Studio newbie to follow.

    If you guys had some kind of video or more detailed instructions, that would really help. The barrier to getting started developing a OneNote plugin is very high right now.


  4. Jiri Matejka says:

    Hello Jay,

    thanks for great example. I'm experimenting with OneNote Addin, but I was not able to find an example of events usage (e.g. OnNavigate). In official doc I see they are not supported from managed code.

    Fine, C++ would be fine, but I haven't seen anyone who was able to listen to this events from C++. Would you share some help? Thanks in advance!

    Mentioned doc:…/gg649853(v=office.14).aspx

  5. Alex says:

    Thanks for the quick response Jay. I was thinking something more along the lines of this:…/addins

  6. Jay Ongg says:

    Hi Alex,

    There is a NodeJS tutorial here:…/OneNoteAPISampleNodejs

    It is for accessing the OneNote service API – which is separate from the COM Addin interface that this post refers to.

    Does that help?

  7. Alex says:

    Hi Jay, do you think you guys could do a sample with the Office.js library or javascript in general? I'd like to be able to just use a simple text editor, I hope that's possible.

Skip to main content