I thought I would take some time today and write up how to program a C/C++ add-in that works with OneNote 2007. Here are the directions I had and downloads below.
CLSCTX_LOCAL_SERVER, __uuidof(IApplication), (void**)&piOneNote);
HRESULT hr = piOneNote->GetHierarchy(NULL, hsNotebooks, &temp);
A huge thanks to Ilya Koulchin for his help with this, I couldn't have done this without you!
This should be all that you need to get this working, but if you need anything please let us know!
PingBack from http://www.onenotepowertoys.com/2007/02/17/developers-links-to-dan-escapas-posts/
Do you know if something similar can be done with a program written in VB.NET? I imagine it would work the same way. I have a VB.NET program that I would like to do this with in addition to C++ addins.
basketcase39 - You can do the same with VB.Net, you would just need to create a COM addin with VB.Net and then register that with OneNote. Most of it will be the same directions, I just don't know how to program in VB.Net. If you take my directions found here:
You can see how to do it in C#, it should be fairly easy from that.
If you get it working please shoot me a line so I can post it on my blog!
After some lengthy discussions with the seller and his broker, I discovered that the seller had a first mortgage with a balance of about $125,000
The term of 'Add in' doesn't define a 'plug in',isn't it?
Hi Daniel, I'm wondering if the C++ approach to add-ins would make sense for this: I want/need to add a function for napkin math. It has a nice set of functions already, but I want to be able to type in quad(1,-1,-1) and have it return the quadratic roots of the function x^2-x-1. What do you think? Could you point me in the right direction to getting this question answered?
When I get navigation events from OneNote add-in, I get only a string ObjectId as a parameter. I want to take this event and re-create it later with NavigateTo. According to MSDN, NavigateTo takes one parameter, ObjectId. This should be ok, however the .h file you supply here says that NavigateTo takes 2 parameters, HierarchyId and ObjectId. This is inconsistent. Is there perhaps a newer .h file? I can't find it anywhere. Why isn't it posted online? We should be able to download the official .h file from somewhere other than your blog.
It is giving this error.How to slove it,pls reply. incorrect <rpcndr.h> version. Use the header that matches with the MIDL compiler.
Error executing cl.exe.
Please provide the above mentioned sample code in C++