Welcome to MSDN Blogs Sign in | Join | Help

Debugging the OneNote API? Enable logging!

One new feature in the RTM version of OneNote 2007 is the ability to enable logging for the OneNote API such that you can see what is going wrong and get some debug information from OneNote. Some notes:

  1. If you turn on logging make sure to TURN it OFF after you are done debugging your app.
  2. You cannot get any more information other than what you get from the debugging output.
  3. It works for toolbar addins as well as calls via the COM API.

To enable logging you will need to turn on some registry keys, here is the .reg file:

-------------------------------

Windows Registry Editor Version 5.00 

[HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\OneNote\Options\Logging]

"EnableLogging"=dword:00000001

"65815"=dword:00000001

"65816"=dword:00000001

-------------------------------

Please copy the text above, open Notepad and paste it in there. Then save the file as EnableOneNoteAPILogging.reg. After you have saved the file run it so that this is added to your registry.

Whenever you make calls to the API OneNote will append logging information to %temp%\OneNote.log which allows you to see what is going wrong with your code and help you debug. Afterwards open regedit and change the EnableLogging key to 0 which will turn it back off.

Published Friday, December 08, 2006 3:16 AM by descapa

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

No Comments

Leave a Comment

(required) 
required 
(required) 
 
Page view tracker