Customer feedback results in another powertoy

I'm going to go off on a tangent here.


Another role OneNote testers have is that of customer advocate. We are tasked with monitoring the OneNote newsgroup, the Customer Connection site, responding to customer feedback and using all of this information to make changes to our test plans for new features.


One request I saw on our newsgroup was a customer who had thousands of TXT files which he wanted to import into OneNote. He had apparently used Notepad for years to store data on his hard drive. Fair enough. But now he wanted to migrate to OneNote and was stuck. The only solution he had was to open them one at a time and copy and paste into OneNote. Clearly not ideal. Another person wanted to see some sample code to simply add some text to a page in OneNote.


I decided to write another powertoy to help both of these users. It will allow you to navigate to a folder on the hard drive and import all the TXT files in it to OneNote. It will create a new section with the name of the folder on the hard drive as the section name. And here I hit a snag. I never really liked the behavior of putting all new information into Unfiled Notes by default. While it makes sense most of the time, in this case I really saw a need to control where the imported text files would go. I decided to implement a tree control to let the user choose which notebook the files would be imported. So now you can choose into which notebook you want the imported files to go. And the second fellow who wanted to see the code for this can download the source.

 This importer currently only works for ANSI text.

Here are the links (corrected ZIP files as of April 3, 2007, and again on Feb 21, 2010)

Update 2:  fixed bug with new line characters not imported into OneNote correctly. 2/23/2009.  Details here.

Update 3: OfficeLive went away, so you can get the newest version here: 

Update 4: The source code is now here:

If you want the source code, email me via the link in the upper right.  If I get enough requests, I will repost the code.

For the setup program:

And the source code (C#)


As always, let me know what you think.


Comments (49)
  1. John,

    No comment on the powertoy, since I’m really too busy to test it.  However, I agree with you completely about unfiled notes.  I hate that everything gets sent there.  I would like to specify where the imported stuff should go (or at least say, "by default, go to unfiled" or "by default, choose where to import").

    This would be a nice change for the next version of OneNote :).

  2. Mark Polino says:

    I get an invalid zip file when extracting the setup.

  3. Joe Polimeni (sunshineJoe on the microsoft office discussion group) says:

    I have the same problem Mark has. I tried to get around the problem by downloading the zip and trying to open it with explorer – but that didn’t work either.

  4. Mark says:

    Similar but unrelated…..

    I have been using OneNote to generate documentation for our office. The screenshot ability is very handy for this. It is not handy that it automatically puts it in a new note. Is there a way to change this to adding it to the currently open note?

  5. I just saw on John’s blog that he posted another powertoy see what he has to say: One request I saw on

  6. You’ve been kicked (a good thing) – Trackback from

  7. Mark says:

    I also get errors when attempting to extract these.

  8. JohnGuin says:

    Sorry all – There is a bug in Office Live that zipped files created with Windows XP (believe it or not) get corrupted when uploaded.

    I’ll have the patched zip files installed by May 4.


  9. Ed Learned says:

    I love the concept of this, but I’m not seeing how to actually perform the import of the text files.

  10. Ed Learned says:

    I tried this and while I can navigate to the folder, when I click import, nothing happens and no import occurs.

  11. JohnGuin says:

    Ed Learned,

    Are the files in TXT format?  Are they ANSI or unicode based?



  12. rx says:

    I tried to open the zip file (Vista) and get the error messages "Windows cannot open the folder.  The Compressed (zipped) Folder ‘location’ is invalid."

  13. Kevin says:

    Can anyone tell me where to get a valid archive or exe of this powertoy? I have downloaded the file using the link multiple times on multiple machines and it is an invalid file every time.

  14. Robin says:

    The file still shows as invalid archive…

  15. s harper says:

    This is really good

    I can import .TXT files


    oneNote does not recognise any EndOfLine/NewParagraph

    in .txt

    Result – all the text in the file is presented as one big paragraph : not much good becoause it needs a load of reediting

    Is there a way round this?

    How does oneNote indicate a newPara?


  16. s harper says:

    Hold on – I get it!

    You have to format the text as HTML

    So oneNote understands that the HTML paragraph tag is a new paragraph.


  17. I wanted to share the status of our shared object model over on So far,

  18. I wanted to share the status of our shared object model over on So far,

  19. Vista says:

    Still winzip can’t handle these files

  20. Vista says:

    Still winzip can’t handle these files

  21. Vista says:

    Recall. Worked now… when opening the zip file directly in winzip and extract. I think NetTransport was the problem…

  22. Frank says:

    Trying to open zip and still comes up as corrupted using Winzip or XP’s native extraction tool.

  23. JohnGuin says:

    Son of a gun.  Can you send me an email (johnguin at hotmail ) and I can email you the ZIP file?  WinISP has been "updating" their server again.

    Sorry for the problem,


  24. Wes says:

    Just found this and I’m getting a message that the zip is invalid. Can you repost?

  25. JohnGuin says:

    Sigh – I’ve been fighting with this ISP to not corrupt uploaded zip files.  I used Winzip this time – can you try again?  Alternately, using Firefox typically works.  IE also reports the (valid) file as corrupt on download.

    Sorry for the problems,


  26. Raamkumar says:


    I want to  Export text to .Txt file from onenote.

    if any one know kindly let me know.

  27. I was getting ready to post this list of the addins the OneNote Test Team worked on in the year 2007

  28. kenar says:


    This is exactly what I needed. However the importer does not recognize linebreaks in text files. All my text in my files came as big chunks of texts. Is there a workaround?

  29. John says:

    Can you use the email link to send me a sample text file?  I tested this pretty well and am not able to reproduce the problem.

    Also, do you know what operating system was used to create the text files?


  30. kenar says:


    I sent it via contact form. Let me know if you got it.

  31. Willem says:

    Dear JohnGuin,

    Thanks a lot for sharing your program.

    It will be of great help reorganising my notes. As the user you mentioned, I have a lot of notes in text files.

    I made 2 small modifications to the program:

      1. It also looks in the subdirectories of the chosen directory.

         around line 90 in Form1.cs:

                   //Willem added SearchOption.AllDirectories.

                   string[] fileName = Directory.GetFiles(pathToTextFiles, "*.txt", SearchOption.AllDirectories);

      2. It adds a <br> automatically before each line feed and the original filename at the end in all files.

         around line 120 in Form1.cs:

                       inputFileString = myFile.ReadToEnd();

                       //Willem added <br> before each linefeed.

                       inputFileString = inputFileString.Replace("n" , "<br>n") +

                           "Pasted from &lt;<a href="" + fileName[i] + "">" + fileName[i] + "</a>&gt;";

    If anybody is interested, then tell me how I can upload the files, executable  and source (converted to Visual Studio 2008).

    What I would like to do as well, is give the note the date and time of the original text file.

    I know how to extract the date and time from the file, but I do not know how to change the date and time of the note. If this can be done at all.

    Any suggestions?

    Finally, I will use this program to upload (text) notes from Outlook 2003. I’ll write an Outlook VBA macro to unload these in text files first.

    When this is ready, I will let you know, because I am willing to share it as well.

    With kind regards,


  32. John says:

    I made a similar fix for the <br> & rn problem and uploaded new source files last night.  I can add your fix for searching subdirectories as well and post an even newer build today if you want.  

    The new files are converted to VS 2008 as well.  

    I have a separate Outlook to ON tool that might be useful as well at  


  33. Willem says:

    Dear John,

    I had seen your other tool but it is Outlook 2007 only. I, and many others, still have Outlook 2003.

    About the fix for searching subdirectories. Ideally it would be an option on the form, because not all user will want to search subdirectories as well.

    With kind regards,


  34. JohnGuin says:

    Hi Willem,

    I was thinking about this over the weekend and figured a nice feature resolves around this – the subfolders holding text files should get imported as separate sections.  But then I got stuck with thinking about how they would be held in section groups…


  35. I received an email which pointed out a limitation and a design problem with the OneNote Text File Importer.

  36. asadal says:

    Dear John,

    Good! This is what I needed. However the importer doesn’t support UNICODE e.g. KOREAN. 🙁

  37. Miguel says:

    I John,

    The links to the plugin and source code are not working. Can you please check It? It seems that your domain is expiring.

    Thank you,


  38. JohnGuin says:

    OK, I think I have them updated correctly…

  39. Gabriel says:

    Thanks, this is exactly what i was looking for. Its a shame that it doesn’t take unicode though; Japanese text is in about a third of my files

  40. Gabriel says:

    I take back what i said 5 minutes ago; i tried it on Japanese and it worked. This program is a perfect 10. Thanks man

  41. JohnGuin says:

    Hello Gabriel,

    Can you contact me via my email link (at the upper right)?


  42. Richard says:

    Another great way of collecting customer feedback at point of sale is via a touch screen kiosk. Feedback collected at point of interaction is a lot more acurate and this method is both time and cost effective.

  43. Matthew says:

    It would be good if this also worked for inserting a folder of Word/OpenDocument Text documents as editable OneNote pages into a OneNote section (PowerPoint/PDF import as bitmaps), setting the date and time at the top of the OneNote page to the file's modified date.

  44. John says:

    The variety of formats of data in those files (HTML, rich text, Unicode, ANSI text, images, videos, etc…) makes that very difficult…

  45. Dirk says:

    Hi John,

    Well, the zip file contains setup.exe and an MSI file, so an install is required. I then get three files: Johnicon.ico,  MS.Interop.OneNote.dll and Text File Importer.exe. The exe doesn't work, just hangs.



  46. JohnGuin says:

    Ah, OK.  Silly mistake on my end – I was working with my section color changer and did not transition to this tool.  If you click File  | Help, what version of OneNote shows on the right?  Does it say anything about "Click to Run?"  or 32 bit?

  47. Felipe Portella says:

    Hi, both links are broken. Can you check it? Thanks

  48. mville says:

    Where can I get the for OneNote 2007?

Comments are closed.

Skip to main content