A beta powertoy for OneNote 2007 to extract highlighted text from a page

    Based on a few requests I received last week, I decided to investigate a powertoy to get the highlighted text from a page. And to be specific, this powertoy gets ONLY the highlighted text and nothing else. The search functionality I wrote about last week did not work for everyone. For the few whose needs were not met by that workflow, the request was to get only a single word or sentence which had been highlighted. The search functionality generally gets the whole paragraph.

    So I had been itching to create another powertoy and this one looked pretty simple. It hasn’t been as easy as I had hoped, but I do have a beta version ready. The setup files are at the end of this article.

    Here’s how it works. Exit OneNote 2007 and run the setup.exe. When you start OneNote, you will get a button named “THE” on the standard toolbar. For what it is worth, the “THE” is an acronym for Text, Highlighted, Extractor (I was thinking of some navy stuff and got into the habit of backwards, thinking over the weekend). Ahem.

    Anyway, this is what it looks like:


    When you click the button, a new page named “Highlighted Text” is created in the current section. The highlighted text from the current page is copied to it. OneNote then opens the new page. That’s about it.

    Some items which do not work right now and other notes:

  1. International support. My first build of this did not work with German text. This one may not either.
  2. The highlighted text is copied from top to bottom.
  3. There is not much error checking.
  4. Lastly, this only works for text that was highlighted with the highlight tool from the Standard toolbar:


    (As opposed to using a pen on a tablet to draw highlighting).

    Anyway, if you want, download it and give it a shot. You can either post bugs you find here in the comments or send me email using the link at the top right. If you find an error that only happens with a particular page and you don’t mind, send me the page as well.

    Good luck!

    Questions, comments, concerns and criticisms always welcome,



Comments (12)

  1. George Hennessy says:

    First a big thanks. I have been looking for this tool for a long time.  Always thought it should have been part of OneNote.  

    Won’t run consitently on my machine.  I have  page with 16 blocks of highlights (two colors: yellow & purple).  Only one container.  Get error after pushing THE button:  Error trying to update page content System.Runtime.InteropServices.COMException (0x80042000): Exception from HRESULT: 0x80042000 at Microsoft.Office.Interop.OneNote,AppIicationClass.UpdatePageContent(String bstrPageChangesXmlIn, Datetime dateExpectdlastModified)

    at The.GetHighightedText.CreatePage(Strlng outlineContent)

  2. JohnGuin says:

    Can you send me the page and a screenshot of what you have selected when you click the button and get this alert?

    Sorry for the problems,


  3. Bryan says:

    Can THE capture highlighted content from muliple pages?

  4. THE installs and it shows up on the toolbar and when I click on it it creates a new page that’s all I can get it to do it wont paste any text, I don’t know maybe I’m not doing something right…

  5. JohnGuin says:

    Can you verify that you highlighted the text you expect to be copied by using the highlight tool?  It won’t work if you used the pen to "draw" highlighting or are applying it via the tagging functionality.

  6. RoxyRose says:

    Hi John,

    I am also having the same issue George is having. But I am going to try to update 2007 and see if that helps. The real question I have is if you have source code for this powertoy? I would like to edit it so that the highlighted test becomes the title of a blank page. I would like to do this because I have lists of items that each one I would like to create a page to elaborate more on. Also, it would be great that this toy uses mouse highlighted text, instead of actual highlighted text. It would be much more useful (and probably more complex). Imagine it, being able to select text off of anywhere such as a webpages and create a page titled with that text so you can write about it later.


  7. JohnGuin says:

    Shoot me an email (link at upper right) and I can send you the source files.  I'll also try to post them on my blog at some point.

  8. RoxyRose says:

    Thanks for the source. By the way, I solved the problem I was having with the same issue George was having by installing Office 07 SP2. Just to help anyone having the same issue.

  9. Eric says:

    Hi John – its been a while since anyone posted here, but THE highlighter sounds like exactly what im looking for.  Im using one note 2010 and i tried to add this function in, but it did not work.  Is there an updated addin for 2010 version of one note?

  10. John says:

    No, I never got this past the "beta" quality and never addresses some serious performance problems with some test cases.  But I did post the code here: blogs.msdn.com/…/source-code-for-the-onenote-text-highlighting-extractor-powertoy.aspx  if someone wants to step up and work on it.

    Sorry for setting an unrealistic expectation here.

  11. Not Developer John says:

    This would be a great tool and I'd be glad to pay for it.  Could you please update for OneNote 2010 and 2013?

  12. Russell says:

    Has this gone any further?  I'd love to see it also extract anything I've highlighted from image files (specifically when I do a "Print to OneNote").  That would be absolutely epic and I'd pay $100 for it.