Welcome to MSDN Blogs Sign in | Join | Help

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) 

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

For the setup program: http://johnguin.com/Documents/OneNote_Text_Importer_Setup.zip

And the source code (C#) http://johnguin.com/Documents/OneNote_Text_Importer_Source.zip

   

As always, let me know what you think.

   

Published Monday, April 30, 2007 8:47 AM by JohnGuin

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# re: Customer feedback results in another powertoy

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 :).

Tuesday, May 01, 2007 10:10 AM by Erik Gulbrandsen

# re: Customer feedback results in another powertoy

I get an invalid zip file when extracting the setup.

Wednesday, May 02, 2007 6:17 PM by Mark Polino

# re: Customer feedback results in another powertoy

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.

# re: Customer feedback results in another powertoy

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?

Thursday, May 03, 2007 12:58 PM by Mark

# Folder of txt files to OneNote - Thanks John!

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

Thursday, May 03, 2007 3:48 PM by OneNote Extensibility & More..

# OneNote Powertoy that imports TXT files w/ Source Code

You've been kicked (a good thing) - Trackback from DotNetKicks.com

Thursday, May 03, 2007 4:45 PM by DotNetKicks.com

# re: Customer feedback results in another powertoy

I also get errors when attempting to extract these.

Thursday, May 03, 2007 5:06 PM by Mark

# re: Customer feedback results in another powertoy

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.

Sigh...

Friday, May 04, 2007 12:15 AM by JohnGuin

# re: Customer feedback results in another powertoy

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

Wednesday, May 16, 2007 3:52 PM by Ed Learned

# re: Customer feedback results in another powertoy

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

Monday, July 09, 2007 12:14 AM by Ed Learned

# re: Customer feedback results in another powertoy

Ed Learned,

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

Thanks,

John

Monday, July 16, 2007 11:55 PM by JohnGuin

# re: Customer feedback results in another powertoy

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."

Monday, August 13, 2007 3:07 AM by rx

# re: Customer feedback results in another powertoy

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.

Monday, August 13, 2007 11:36 AM by Kevin

# re: Customer feedback results in another powertoy

The file still shows as invalid archive...

Monday, August 20, 2007 1:04 AM by Robin

# re: Customer feedback results in another powertoy

This is really good

I can import .TXT files

BUT

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?

^sharp

Wednesday, September 26, 2007 11:25 AM by s harper

# re: Customer feedback results in another powertoy

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.

lovely!

Wednesday, September 26, 2007 11:29 AM by s harper

# Shared Source Object Model Update 1

I wanted to share the status of our shared object model over on http://www.codeplex.com/onom So far,

Monday, October 08, 2007 11:27 AM by OneNote Testing

# Shared Source Object Model Update 1

I wanted to share the status of our shared object model over on http://www.codeplex.com/onom So far,

Monday, October 08, 2007 12:15 PM by Noticias externas

# re: Customer feedback results in another powertoy

Still winzip can't handle these files

Monday, October 29, 2007 12:11 PM by Vista

# re: Customer feedback results in another powertoy

Still winzip can't handle these files

Monday, October 29, 2007 12:11 PM by Vista

# re: Customer feedback results in another powertoy

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

Monday, October 29, 2007 1:58 PM by Vista

# re: Customer feedback results in another powertoy

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

Thursday, November 29, 2007 12:17 PM by Frank

# re: Customer feedback results in another powertoy

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,

John

Thursday, November 29, 2007 12:41 PM by JohnGuin

# re: Customer feedback results in another powertoy

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

Friday, March 07, 2008 6:28 PM by Wes

# re: Customer feedback results in another powertoy

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,

John

Friday, March 07, 2008 6:44 PM by JohnGuin

# re: Customer feedback results in another powertoy

Hi,,Friends

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

if any one know kindly let me know.

Thursday, June 05, 2008 7:44 AM by Raamkumar

# A summary of the OneNote powertoys from the test team for 2007

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

Thursday, June 12, 2008 12:40 PM by OneNote Testing

# re: Customer feedback results in another powertoy

Hi

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?

Friday, February 20, 2009 7:15 PM by kenar

# re: Customer feedback results in another powertoy

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?

John

Friday, February 20, 2009 7:18 PM by John

# re: Customer feedback results in another powertoy

Hi

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

Friday, February 20, 2009 11:16 PM by kenar

# re: Customer feedback results in another powertoy

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,

Willem

Saturday, February 21, 2009 3:32 AM by Willem

# re: Customer feedback results in another powertoy

I made a similar fix for the <br> & \r\n 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 http://blogs.msdn.com/descapa/archive/2007/02/14/export-your-outlook-notes-to-onenote.aspx.  

John

Saturday, February 21, 2009 12:00 PM by John

# Outlook to ON tool: Outlook 2007 only

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,

Willem

Monday, February 23, 2009 9:29 AM by Willem

# re: Customer feedback results in another powertoy

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...

John

Monday, February 23, 2009 10:20 AM by JohnGuin

# Updating the OneNote Text File Importer

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

Monday, February 23, 2009 10:42 AM by OneNote Testing

# re: Customer feedback results in another powertoy

Dear John,

Good! This is what I needed. However the importer doesn't support UNICODE e.g. KOREAN. :(

Monday, February 23, 2009 11:39 PM by asadal

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker