I want to implement a COM OneNote Add-In (for OneNote Desktop) with the following functionality:
- User selects some text and then clicks the FORMAT button exposed by the add-in: the add-in will format the selected text in some specific way (e.g. surround the text with "<<>>" and change its background and foreground color.
- Later on when the user clicks on a text that was formatted as described above the add-in kicks in and copies the text in clipboard
I am new to COM add-ins, and I wasn't able to find a good API documentation. I've started with VanillaAddIn (https://github.com/OneNoteDev/VanillaAddIn) and now I need to add my functionality. I would really appreciate any help with the following:
- How to get the selected text from a page?
- How to subscribe to the OnClick event?
- Is there a good/decent OneNote API documentation? I found some links but I still hope there is a better one that I missed so far.