Source code for the OneNote Text Highlighting Extractor Powertoy


Way back in 2009 I released a “beta” version of a toy that extracts highlighted text from a page – http://blogs.msdn.com/b/johnguin/archive/2009/08/24/a-beta-powertoy-for-onenote-2007-to-extract-highlighted-text-from-a-page.aspx

I wrote a little about it as well and am finally getting around to posting the source code for it. There is not a lot to it and I wrote about the only tricky part of it here: http://blogs.msdn.com/b/johnguin/archive/2009/08/27/fixing-a-bug-with-the-highlighted-text-addin.aspx

So as usual, you can get the code in the ZIP file below my name.

One lesson I learned is not to name files “THE”. Searching for “the” simply returns too many hits and made digging up the source code much more time consuming than it should have been.

The other interesting tidbit here is that when I got an email request for this code, I could not find it (partly because of the poor name I chose). I looked in all my usual areas (the notebook I originally used to write it is packed up right now) so I checked my USB key, Skydrive, some of my work machines and could not find it. I finally remembered I had a machine that has been offline from Mesh for quite a while and there was a copy of the files on it. I wipe my machines so often that I frequently don’t get Mesh reinstalled so I was glad I still had that one offline copy. Apparently when I cleaned up my Mesh files over the last few years I had deleted the server copy as well.

Just one more reason to check this into a repository.

I hope you find the code useful.

Questions, comments, concerns and criticisms always welcome,
John

the.zip


Comments (3)

  1. John Schroedl says:

    Thanks for sharing the source!  While attempting to build the solution, I allowed the migration to VS2010sp1 and hit some errors during the build.  It looks like the key file cannot be used. Any advice for me? Can I just make a new one somehow and drop it in the project as 6a.pfx? (I'm not an expert at signing things just yet so this may be obvious to others…)

    John

    —— Build started: Project: THE, Configuration: Release Any CPU ——

    C:WindowsMicrosoft.NETFrameworkv4.0.30319Microsoft.Common.targets(1970,9): error MSB3325: Cannot import the following key file: 6a.pfx. The key file may be password protected. To correct this, try to import the certificate again or manually install the certificate to the Strong Name CSP with the following key container name: VS_KEY_D1F21867F37834B2

    C:WindowsMicrosoft.NETFrameworkv4.0.30319Microsoft.Common.targets(1970,9): error MSB3321: Importing key file "6a.pfx" was canceled.

  2. I'll answer my own question. I needed to go to Properties, Signing tab in Visual Studio and under Choose a Strong Name Key File… I selected <New…> and made a new one with my own password. This was used in the project and it built fine. I installed w/ no problems.

    The powertoy does show up in OneNote 2010 but doesn't seem to extract any of my highlighted text…oh well…

  3. JohnGuin says:

    Did you apply the tag or use the pen as a highlighter?  This only works with tagged text.