Notebook cleaner and privatizer powertoy


 

People that publish shared notebooks in some environments have a couple of requests which need to be addressed.  First, suppose you are an administrator creating a section or some pages in a “New Employee Orientation” notebook which will be shared with all new employees at your company.  OneNote keeps track of who modifies information on a page in shared notebooks (right click the “Outline Element” to see on the context menu who last modified it), but in this scenario, it is really irrelevant who typed the information.  Wouldn’t it be nice to remove that data from the notebook?


 


People also may want this as an additional level of privacy.  I suggest spot checking the results if it is really critical that the personal information is removed.


 


Another problem is a bit more subtle.  If you add a lot of information to a page, focus (technically, the “insertion point,” or location of the cursor) is remembered and focus goes to that location when anyone navigates to that page.  For our scenario, you would probably want the focus to be at the top of each page by default, but since you probably typed the information at the bottom of the page most recently, focus is left at the bottom.  The tedious way to move focus to the top of the page is to manually open each page and click at the top. 


 


Or, you can install the “Notebook Cleaner” powertoy from http://johnguin.members.winisp.net/Shared%20Documents/OneNote%20Notebook%20Cleaner.zip and let it do all this work for you.  (Update: the link for downloading is below my signature at the end of this entry).


 


Gary Neitzke wrote this tool and here is his summary:


 


Purpose:


To remove author information and reset navigation points to make the notebook easily distributable.


 


Description:


This add-in will allow you to prepare a notebook for distribution. When started it will do several things:


 


1.) Reset all navigation points to the top most page of each section, and the top most section of each section group.


2.) Removes selection from content so the cursor will be in the title box


3.) Clears Author and LastModifiedBy items .


 


This tool also includes a pair of registry files to toggle cleaning the names on or off.  If you only want to move focus to the top of each page in a notebook, double click the “DisableCleaning_Names.reg” file to leave the author names intact.  To re-enable this functionality, click the “EnableCleaning_Names.reg” file.  Cleaning the names is the default.


 


I can’t really demonstrate this addin easily since I don’t want to wipe out the “Last Changed By” data in my shared notebooks.  The toolbar does not have an icon – it just uses “Clean Notebook” as a label.


 


And we’re still fixing a few nagging bugs with the Journal Importer.  It should be done in the next few days, so please bear with me.


 


Questions, comments, concerns and criticism always welcome,


John Guin


 

scrubber.zip

Comments (11)

  1. Carsten says:

    Dear John! Dear Gary!

    Great job, you people are doing here!

    Producing powertoys by the dozen.

    Thank you so much.

    This one works well on most of my notebooks. After cleaning pages are starting much faster.

    Some notebooks of mine turn the application to crash Onenote, though.

    Example:

    "An error occurred while cleaning Notebook:

    Details:

    System.Runtime.InteropServices.COMException (0x800706BA): Der RPC-Server ist nicht verfügbar. (Ausnahme von HRESULT: 0x800706BA)

      bei Microsoft.Office.Interop.OneNote.ApplicationClass.GetHierarchy(String bstrStartNodeID, HierarchyScope hsScope, String& pbstrHierarchyXmlOut)

      bei ScrubberAddIn.ONScrub.newAlgoClearPages()

      bei OneNoteAddIn.ONAddMain.startCleaning()

    Hope this information helps. Keep on going!

    Kind regards

    Carsten

  2. JohnGuin says:

    Hmm – I’ll check out the crash.  Is this notebook on a network share which is connected?

    John

  3. Carsten says:

    No (to my knowledge), it is on a Tablet PC (workstation) connected to the Internet via DSL (that is a network connection, but I think you mean something different). In case you need more information, I’ll try to supply what I can. Got another crash, I shall try to reconstruct it. Great to answer, thanks a lot.

    Yours,

    Carsten

  4. Carsten says:

    Here’s the other:

    System.UnauthorizedAccessException: Zugriff verweigert (Ausnahme von HRESULT: 0x80070005 (E_ACCESSDENIED))

      bei Microsoft.Office.Interop.OneNote.ApplicationClass.GetHierarchy(String bstrStartNodeID, HierarchyScope hsScope, String& pbstrHierarchyXmlOut)

      bei ScrubberAddIn.ONScrub.newAlgoClearPages()

      bei OneNoteAddIn.ONAddMain.startCleaning()

  5. Carsten says:

    As the messages basically are the same,I conclude that the crash would be caused by some specific trait of the document accessed.

    In the first of the two cases those were print outs (send to Onenote 2007) of invoices from a purchase I made through the Internet. Does that help?

    Yours, kindly

    Carsten

  6. JohnGuin says:

    Printouts are probably the key – let me see if I can reproduce the crash locally.

    Thanks,

    John

  7. Carsten says:

    But why only some? I do them all the time.

    Thanks for caring,

    Carsten

  8. Mike says:

    I would really like to use this tool but it doesn’t work on my computer.

    It does set "all navigation points to the top most page of each section"

    But it does not "Removes selection from content so the cursor will be in the title box"

    The cursor remains at the last edit point.

  9. hyde says:

    After installing, I don’t see "Clean Notebook" on my toolbar. I have a few other addins already, and it’s not listed amongst them. I can’t find it anywhere – where should I see it?

  10. hyde says:

    Nevermind, I simply uninstalled and reinstalled and it’s there now. I set the toolbar to 2 rows while fiddling around, trying to find it – other than that I did everything the same between installs, including exiting OneNote beforehand, so I don’t know what happened.

  11. Rod says:

    I keep records of stock performance including articles on internet, screenshots from charting program and other notes. Each stock has its own page and normally stuff is added to the top of the page but sometimes it is added in the middle.

    I ran Clean Notebook for the first time and it drastically reduced the size of ALL the sceenshots and did not move the focus to the top of the page (I think the cursor was in the title line but the part of the page being displayed was not always at the top.

    I restored from backup. I then  double clicked "DisableClean.reg" and ran the  CleanNotebook again. This time charts were not reduced in size (thankfully) but the part of each page being displayed was not always at the top.

    Please help

    Rod

Skip to main content