Looking through my Sent Items folder in Outlook for the past few weeks, I realized I had asked and told a few people about this registry key:

HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\OneNote\OpenNotebooks

I've had to modify the contents of this key a few times for troubleshooting recently and I always keep this backed up on my dogfood machines. Let's take a look at this key from a black box point of view.

As far as registry keys go, this is as close to self explanatory as they get. This is the list of notebooks that OneNote will try to open when it starts. This seems reasonable and the notebook location is laid out as an easy to read string value. But looking at the sentence "This is the list of notebooks that OneNote will try to open when it starts" leads to some interesting test questions. An obvious one is "what happens if you try to open a notebook and OneNote cannot connect to it?" An example of this would be a server hosting a notebook being down or your computer not having network connectivity. The answer OneNote has is "it will use the cached copy of the notebook" so you can continue working in this offline case.

Let's say I wanted to test this registry key to see what OneNote would do if I make changes. I would start by removing notebooks from it - this seems like a reasonable first step.

Here's what I will do. First, backup my current set of keys from a test machine I use. This is what I have:

clip_image001

Now I will delete the #5 entry (that is a SharePoint based notebook on a server I have in my office) and delete my cache file (the .onecache file I have - this avoids "living in the cache" and any behavior associated with that. Since I'm black box exploratory testing here, I want to keep the variables to a minimum as I try to find out what will happen). Then I will restart OneNote.

I expect I will start with a blank UI ("fishbowl" in the OneNote lingo) and then I will sync the notebooks 1-4. And sure enough, that is what happens. I get the blank, gray UI and then the 4 notebooks draw. The notebook on the external file share (the one cryptically named "12") shows with the spinning green icon, and then sync completes. My cache file was built and I am ready to edit my notes.

The reason I have this key backed up is that on my dogfood machine I have 11 notebooks open. They are scattered across different SharePoint, DAV and UNC servers all over the place, and opening them after I wipe my machine and reinstall can be tedious if I have to browse to each server. This way I can simply import my registry file and start OneNote to sync them.

Further testing would focus on adding new notebooks, adding invalid notebook locations, deleting keys out of order, leaving the cache intact, etc… The test matrix would get pretty large, but starting OneNote is fairly quick, so working through it would not take long.

The end result of all of this is that if you want to start playing around with closing notebooks or otherwise using a big hammer (deleting the cache files) to fix problems, you probably can't go wrong with backing up this registry key.

Questions, comments, concerns and criticisms always welcome,

John