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 :) ).
Enjoy!
Comments
Anonymous
November 17, 2015
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.Anonymous
November 18, 2015
Hi Alex, There is a NodeJS tutorial here: github.com/.../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?Anonymous
November 18, 2015
Thanks for the quick response Jay. I was thinking something more along the lines of this: dev.office.com/.../addinsAnonymous
December 04, 2015
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: msdn.microsoft.com/.../gg649853(v=office.14).aspxAnonymous
March 14, 2016
The comment has been removedAnonymous
May 28, 2016
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 application.run() method to run my mainform, I know when you use form.show() or application.run() 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.Anonymous
March 19, 2017
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?