Condividi tramite


The text importer powertoy gets updated for OneNote 2010

I saw a tweet a few days ago which mentioned that someone would have "no more thousands of text files" now that she was moving to OneNote. I just missed saving a copy of that tweet, but the thought reminded me of a powertoy I wrote a few years ago that imports all the text files in a folder into a new section. It was designed to help folks move from "piles of TXT files" into OneNote quickly. I only used it once myself (once I moved all my stuff into OneNote I did not repeat the process) and then forgot about it.

Anyway, this tweet served as inspiration to update this for OneNote 2010. I literally only had to do the steps from my previous article. I added a link to this blog, though, and changed the text on the window for it to mention OneNote 2010. The download is below - there is still no install. Just unzip the file and run the tool. Otherwise, it works just like the original. Here's a screenshot to get you started:

clip_image001

Browse to the location with your text files then select which notebook should get the new section added to it. The name of the new section will be the same name as the folder which held the text files.

The code is functionally unchanged from the OneNote 2007 version so I won't include it here. You can get it from the original version (link above) if you want it.

Enjoy!

Questions, comments, concerns and criticisms always welcome,

John

OneNote 2010 Text Importer.zip

Comments

  • Anonymous
    July 26, 2010
    Thank you. This can be very useful. Does it only work with text files? I have a tons of jpg files (pictures of all my handwritten notes etc.) is there an easy way to transfer those?

  • Anonymous
    July 26, 2010
    Only text files (and plain text, at that).  the source code is available if you want to adapt it to your needs.

  • Anonymous
    July 26, 2010
    Thank you for the reply. I wish I knew how to do programming. Alas, I don't:)) So, there is no other easy way to transfer a big batch of .jpg files?

  • Anonymous
    July 26, 2010
    I have just started using OneNote and have several 1000 files from another organizer-type program - this powertoy is just what I need. Thanks.

  • Anonymous
    July 28, 2010
    For bulk importing, you may want to try autohotkey.  www.autohotkey.com - it's not all that complicated to setup.

  • Anonymous
    October 27, 2010
    is there anything similar that can import pdf? now i know the "print" to onennote function. but this is not what i want to do. im looking for something that can import the text of a pdf into onennote (as text). thanks

  • Anonymous
    October 27, 2010
    No solution for PDF that I know.  Can you save PDF as text files then import here (not sure if that is possible either).

  • Anonymous
    January 26, 2011
    Thanks John, I just can't understand why they left this feature out.

  • Anonymous
    March 22, 2011
    Did you use unicode? The german letters (eg. äöü) are displayed incorrectly.

  • Anonymous
    March 22, 2011
    Basti - no, this is ANSI only.  Converting to unicode would mean writing this to convert the ANSI to HTML and importing that into OneNote.  I kept it simple, but the code is available should anyone want to update it in the future.

  • Anonymous
    February 15, 2012
    The comment has been removed

  • Anonymous
    May 06, 2012
    In choose notebook, it does not display any info.....help please

  • Anonymous
    May 06, 2012
    There should be a log file in the folder where you ran the application.  What are the contents of that log? And if you click File | Help, what version of OneNote do you have listed on the right?

  • Anonymous
    May 06, 2012
    I can give you access to my computer, let me know we can chat via skype

  • Anonymous
    May 06, 2012
    I can now see hte Notebooks with + sign,  but, when I ran it says Onenotes Stopped working

  • Anonymous
    May 06, 2012
    Microsoft Office Professional Plus 2010 14.0.6112.5000 (32 bit ) Windows OS : 7 64 bit

  • Anonymous
    May 06, 2012
    OK, here is some results I'm able to import if fie size is about 200K or 500K, but nothing happened to 7MB file size Now when I have muliple pages, in Outlook notes; after export to OneNotes, it dumps everything to one page. How do I duplicate this as it is in Outlook - in multiple pages

  • Anonymous
    May 06, 2012
    System.Runtime.InteropServices.COMException (0x80042000): Exception from HRESULT: 0x80042000   at Microsoft.Office.Interop.OneNote.ApplicationClassCOM.UpdatePageContent(String bstrPageChangesXmlIn, DateTime dateExpectedLastModified, XMLSchema xsSchema, Boolean force)   at Microsoft.Office.Interop.OneNote.ApplicationClass.UpdatePageContent_AutoBusyRetry(String bstrPageChangesXmlIn, DateTime dateExpectedLastModified, XMLSchema xsSchema, Boolean force)   at Microsoft.Office.Interop.OneNote.ApplicationClass.UpdatePageContent(String bstrPageChangesXmlIn, DateTime dateExpectedLastModified)   at Text_File_Importer.FormTextImporter.buttonImport_Click(Object sender, EventArgs e)

  • Anonymous
    May 06, 2012
    OK, let me see if I can find out what is happening with large files.

  • Anonymous
    May 06, 2012
    Also, why all the notes and dump into one page ? I thought it would create a similar multi page notes

  • Anonymous
    May 08, 2012
    John, Any update : a) the big size file does not work b) it dumps everything to one note c) when I use OneNote2010 to publish to SkyDrive, why it does not show me my section, pages , subpages etc  ????  Also, if I have the multiple notes ,  it also does not show that as well.....also, where is the search section in SkyDrive version ? If MS is planning to go everything cloud, in Office 2015,  then,  these should be corrected.....,  I use the same computer to connect to SkyDrive. Once connected, even if I say, open in local OneNote2010,  it does not open the local OneNote2010 version .....  ???  It says, you do not have new version of 2010 or your version is too new.......what is going on  ??????

  • Anonymous
    May 10, 2012
    Any update ?

  • Anonymous
    May 11, 2012
    Uddhav, I looked through the code and files of less than 2GB should work.  Can you use the email link in the upper right to contact me?  I'm going to need the log file the tool creates from your machine and a sample file that is causing the problem. What language are you using?

  • Anonymous
    August 13, 2012
    Dear John, thanks for this awesome tool! Exactly what I needed, since I too am migrating thusands of textfiles in folders and subfolders into onenote. And right here's my issue: The current version of your tool seems to not import files stored in subfolders. In your update from 2009, you included this function, but the current version only regarded the files in the actual folder. Any ideas? Thanks a lot!!

  • Anonymous
    August 17, 2012
    Yep, it should be importing from the subfolder.  Only ideas I have about this not working would be read only subfolders, the subfolder has some corruption or some other odd scenario like that. How long is the path to the subfolder, and how many files does it have? And how long is the path to the section to which you are importing the files?

  • Anonymous
    August 29, 2012
    It sounds great. Is the OneNote 2007 version still availible?

  • Anonymous
    August 30, 2012
    Yes, it is at blogs.msdn.com/.../customer-feedback-results-in-another-powertoy.aspx And notice how often the files got moved from server to server :)

  • Anonymous
    October 10, 2012
    This is on Windows 7 Ult 64-bit, Outlook/OneNote 2010 32-bit Outlook and OneNote are both ver. 14.0.6123.5001 Exception from HRESULT: 0x80042020 System.Runtime.InteropServices.COMException (0x80042020): Exception from HRESULT: 0x80042020   at Microsoft.Office.Interop.OneNote.ApplicationClassCOM.UpdatePageContent(String bstrPageChangesXmlIn, DateTime dateExpectedLastModified, XMLSchema xsSchema, Boolean force)   at Microsoft.Office.Interop.OneNote.ApplicationClass.UpdatePageContent_AutoBusyRetry(String bstrPageChangesXmlIn, DateTime dateExpectedLastModified, XMLSchema xsSchema, Boolean force)   at Microsoft.Office.Interop.OneNote.ApplicationClass.UpdatePageContent(String bstrPageChangesXmlIn, DateTime dateExpectedLastModified)   at Text_File_Importer.FormTextImporter.buttonImport_Click(Object sender, EventArgs e)

  • Anonymous
    October 11, 2012
    The comment has been removed

  • Anonymous
    November 01, 2012
    Having issues importing.  Windows 7, 64 bit.   Notebooks are not available to choose from in the import to section.  Tried importing anyway, and it just gives me an error.   Do I need to have one note running?

  • Anonymous
    November 01, 2012
    You should not need OneNote running, but I never tested to see if the needed COM objects could start quickly enough.  I'd try with OneNote running first. What error are you getting?

  • Anonymous
    November 07, 2012
    When the power toy runs, I don't get an option to select the notebook to import to.  If I continue and click import anyway, I get an unhandled error: "Object reference not set to an instance of an object".  

  • Anonymous
    November 14, 2012
    What version of OneNote do you have?

  • Anonymous
    November 25, 2012
    Should the Text File Importer tool work with OneNote 2013?  I managed to export all my Outlook notes to Text files.  But now when i run the Text File Importer tool, it creates the Section based on the Folder name, but only creates one blank, untitled page and gives the following error in the log file. System.Runtime.InteropServices.COMException (0x80042001): Exception from HRESULT: 0x80042001   at Microsoft.Office.Interop.OneNote.ApplicationClassCOM.UpdatePageContent(String bstrPageChangesXmlIn, DateTime dateExpectedLastModified, XMLSchema xsSchema, Boolean force)   at Microsoft.Office.Interop.OneNote.ApplicationClass.UpdatePageContent_AutoBusyRetry(String bstrPageChangesXmlIn, DateTime dateExpectedLastModified, XMLSchema xsSchema, Boolean force)   at Microsoft.Office.Interop.OneNote.ApplicationClass.UpdatePageContent(String bstrPageChangesXmlIn, DateTime dateExpectedLastModified)   at Text_File_Importer.FormTextImporter.buttonImport_Click(Object sender, EventArgs e)

  • Anonymous
    November 29, 2012
    It should work fine.  Can you share the text files you are trying to import?

  • Anonymous
    December 01, 2012
    The comment has been removed

  • Anonymous
    December 26, 2012
    Are you using OneNote 2010?  And you can contact me via email by using the link at the upper right.

  • Anonymous
    February 16, 2013
    Hi John, I'm seeing the same thing as Ali above, with OneNote 2013 (not 2010):  Importer runs, I'm able to select a notebook, new section runs, but no pages are created. Did you ever figure this out?

  • Anonymous
    February 18, 2013
    Yes, the text importer is specific to the version of OneNote you are using.  I have not updated it for 2013 yet.  Send me an email from the upper right if this is a large problem, though, and I'll see what I can do.

  • Anonymous
    August 07, 2013
    Any fix onenote 2013 yet? i have over 500 notes that i converted to text files from outlook notes. Can't believe microsoft included a 'send to onenote' button for email, but it doesn't work for NOTES.. you can send NOTES to oneNOTE but you can send email.. anyway, any help will be much appreciated!! i can help pore over the code if you can tell me what i should be looking for.

  • Anonymous
    August 26, 2013
    It would be fantastic to have an updated version for One Note.

  • Anonymous
    September 10, 2013
    Thanks, I love you, this software saved me a lot of time! Thanks again. Also, thanks.

  • Anonymous
    September 19, 2013
    Any news for Outlook 2013 / OneNote 2013 tool ?

  • Anonymous
    October 17, 2013
    Unfortunately this doesn't work. I have W7 64 bit, OneNote 2010. Nothing happens and the following error is shown in a text log file: System.Runtime.InteropServices.COMException (0x80042000): Exception from HRESULT: 0x80042000   at Microsoft.Office.Interop.OneNote.ApplicationClassCOM.UpdatePageContent(String bstrPageChangesXmlIn, DateTime dateExpectedLastModified, XMLSchema xsSchema, Boolean force)   at Microsoft.Office.Interop.OneNote.ApplicationClass.UpdatePageContent_AutoBusyRetry(String bstrPageChangesXmlIn, DateTime dateExpectedLastModified, XMLSchema xsSchema, Boolean force)   at Microsoft.Office.Interop.OneNote.ApplicationClass.UpdatePageContent(String bstrPageChangesXmlIn, DateTime dateExpectedLastModified)   at Text_File_Importer.FormTextImporter.buttonImport_Click(Object sender, EventArgs e)

  • Anonymous
    October 17, 2013
    Unfortunately this doesn't work... But I guess we are used to Microsoft products not working anyway. I am using Windows 7,64bit with OneNote 2010. I have tried importing into a local Notebook and a web/online Notebook and the result is the same: NADA The error log shows this message: System.Runtime.InteropServices.COMException (0x80042000): Exception from HRESULT: 0x80042000   at Microsoft.Office.Interop.OneNote.ApplicationClassCOM.UpdatePageContent(String bstrPageChangesXmlIn, DateTime dateExpectedLastModified, XMLSchema xsSchema, Boolean force)   at Microsoft.Office.Interop.OneNote.ApplicationClass.UpdatePageContent_AutoBusyRetry(String bstrPageChangesXmlIn, DateTime dateExpectedLastModified, XMLSchema xsSchema, Boolean force)   at Microsoft.Office.Interop.OneNote.ApplicationClass.UpdatePageContent(String bstrPageChangesXmlIn, DateTime dateExpectedLastModified)   at Text_File_Importer.FormTextImporter.buttonImport_Click(Object sender, EventArgs e)

  • Anonymous
    October 17, 2013
    I've seen this and am trying to troubleshoot.  It's slow going - probably something very obvious, I just have not been able to isolate the problem...

  • Anonymous
    December 03, 2013
    Hi John, Great work on this - much needed.   Have you managed to resolve issue with transferring notes from exported files into onenote? importer doesn't work on my W7 64bit either. thanks will hopefully get a fix soon.

  • Anonymous
    December 09, 2013
    Hi all, I think I have the problem fixed.  Can you email me via the link in the upper right corner?  I can send you a "beta" version to ensure it works, then post it here once I get some independent validation.  Sorry for the delay here.

  • Anonymous
    January 03, 2014
    Did you solve this problem?  I got the same Exception from HRESULT: 0x80042000 error when I tried out the code in VS express 2010 using OneNote 2010.  I fixed it by changing the reference to OneNote 14.0 and the xml namespace string's date from 2007 to 2010 to fix it.

  • Anonymous
    January 03, 2014
    I got the same exception (0x80042000) testing the code for the bulk importer using VS Express 2010 and OneNote 2010. I had to change the OneNote reference from 12.0 to 14.0 and the namespace date from 2007 to 2010 to fix it.

  • Anonymous
    January 05, 2014
    Yep - that is how to update addins from 2007 to 2010.

  • Anonymous
    March 29, 2014
    I tried this on my XP system ... I downloaded and unzipped the exe file.  Clicked on it and ... nothing. Any ideas?

  • Anonymous
    April 14, 2014
    There should have been a log file created in the same folder where you ran the EXE.  Did you copy the exe to a permanent folder?  And what is in the log file?

  • Anonymous
    May 21, 2014
    Thank you for your tool, it worked well for me. May I see the source code, so I can try to extend it for importing binary files?

  • Anonymous
    May 21, 2014
    Email me (link is in upper right) and I can send you the code.  Also, see this as well for binary content on a page: blogs.msdn.com/.../looking-at-the-code-for-the-image-importer.aspx

  • Anonymous
    June 07, 2014
    The comment has been removed

  • Anonymous
    July 06, 2014
    Hi .. I just tried the import program and I'm getting the section created for "MyOutlookNotes" in OneNote, which is the name of the folder the export macro created containing all the txt files for each note ... but I'm not getting any of the individual Notes created as a page.   I am getting the following in the log file for OneNoteTextFile_Importer_error_log: System.Runtime.InteropServices.COMException (0x80042001): Exceiption from HRESULT: 0x80042001 at Microsoft.Office.Interop.OneNote.ApplicationClassCOM.UpdatePageContent(StringbstrPageChangesXmlIn, DateTime dateExpectedLastModified, XMLSchema xsSchema, Boolean force) at Microsoft.Office.Interop.OneNote.ApplicationClass.UpdatePageContent_AutoBusyRetry(String bstrPageChangesXmlIn, DateTime dateExpectedLastModified, XMLSchema xsSchema, Boolean force) at Microsoft.Office.Interop.OneNote.ApplicationClass.UpdatePageContent(String bstrPageChangesXmlIn, DateTime dateExpectedLastModified) at Text_File_Importer.FormTextImporter.buttonImport_Click(Object sender, EventArgs e) Appreciate any help you can provide in troubleshooting this .... I'm using Windows 7 64bit and Outlook 2013. Thanks!

  • Anonymous
    July 08, 2014
    One dumb limitation I forgot is that the DLL has to be in the same folder as the EXE file - can you double check that to make sure they are together?

  • Anonymous
    July 08, 2014
    My contribution.....I had about 150 Outlook Notes that I wanted to pull into OneNote 2013.  I found this URL ( www.howtogeek.com/.../import-evernote-files-into-ms-onenote-2010 ) and this gave me the idea that I used which was successful.  It wasn't exactly what I wanted but it did work and I couldn't spend anymore time on this.  I would agree with other folks who have posted comments that this is completely RIDICULIOUS that there's not a better way to do this.  Not a good move in trying to get folks to use your product. From Outlook, I would select the Notes folder that I wanted to export over, select every Note within that folder and then select to Forward it to an email address. Save it as a draft. Go into your draft folder, right click on the draft and then Select OneNote (this will bring up the GUI of where you want to save it within OneNote) You'll find the Notes moved into OneNote as an icon which you can then open and view (and this is the part that isn't what I was looking for but at least I have the data and I can go back later and cut/paste it into the format that I was expecting). I hope this helps someone who's spent as much time as I have in trying to do this.  I followed the directions above but I was unable to convert the TXT files (from my Outlook Notes folders) into OneNote using the TXT conversion tool.  It would run but nothing came over and the log file was empty.

  • Anonymous
    July 08, 2014
    Not 100% on topic, but you can now email to "me@onenote.com" to send email directly to OneNote.  Details at www.onenote.com

  • Anonymous
    July 08, 2014
    Hi John ... appreciate you taking the time to respond on this ... I can gaurantee that the exe is not anywhere near any DLL :).  It is just in the Downloads folder ... What DLL are you referring to, so I can make sure I have the exe in the same folder? Thanks! Patty

  • Anonymous
    July 10, 2014
    The zip file should have the DLL in it - let me know if it is not there.  2013 version, right?

  • Anonymous
    August 23, 2014
    The comment has been removed

  • Anonymous
    August 23, 2014
    The comment has been removed

  • Anonymous
    August 31, 2014
    This works amazingly well and saved a heck of a lot of time. However, I was a little dissapointed OneNote wasn't able to pick up the orignal date time information from the txt files? Any way of doing this?

  • Anonymous
    September 03, 2014
    Thankyou for your service. this function works well but only Eng. I am not English speaker and writer. Do you have any plan to fix and suports to other language ( BY UNICODE) ?

  • Anonymous
    September 06, 2014
    I've tried it twice with OneNote 2010 on an Asus laptop, it crashed OneNote both times. Please contact me millardjmelnyk@gmail.com

  • Anonymous
    September 13, 2014
    Thanks for this tool -- I did get it to work. It does not recurse folders and it seems necessary to choose a folder -- it doesn't seem to put them in "unfiled" if you don't. But it works well enough. I can't believe it is this much trouble to convert Outlook notes into OneNote. It is done now, so I'll start to explore its features. Thanks again.

  • Anonymous
    November 14, 2014
    Just a small note - on a brand new Windows 8.1 the tool doesn't run and gives no error. It appears that the supposedly preinstalled .NET Framework 4.5.1 is not enough. I have downloaded and installed .NET 4.5.2 from Microsoft site and after this the tool worked. Another problem is non-latin ANSI text in notes - it would be great if the tool could ask what charset to use during the import, but maybe I am asking too much. Thank you for the job! :)

  • Anonymous
    December 11, 2014
    This is a brilliant tool. I have some markdown files (*.md). I tried to run the tool, but it was looking for .txt file, wrote a quick script to rename the extension to .txt and then the import worked just fine. A quick question, does it allow to import html file? I have some html documentation files with pictures that I want to import into Onenote. thanks John again.

  • Anonymous
    December 11, 2014
    No, no HTML.  That was something I never had time to tackle - I think you would need to run it through an HTML to RTF converter and then use the RTF that resulted.

  • Anonymous
    December 12, 2014
    John, so can it handle .rtf file? Hmmm. i did not know that. Would it also handle the images in the rtf file? Btw, you mentioned somewhere in your other post about the files in sub folders? Is it working too? For example, if I am importing txt files as follows: root directory test1.txt test2.txt subfolder  test3.txt  test4.txt Thanks.

  • Anonymous
    January 20, 2015
    From my testing, the addon does not appear to handle RTF. I get a "there are not text files" error when I try.

  • Anonymous
    January 20, 2015
    Correct - text only.  Getting RTF to work would have meant implementing a rtf to html routine (which are available) but I never had time for that.

  • Anonymous
    April 12, 2015
    Where I can download the dll file? It is not included in the zip file. Thanks.

  • Anonymous
    December 07, 2015
    Any chance of updating this for Notes 2016 pretty please? Hundreds of notes to copy and paste otherwise :( Thanks

  • Anonymous
    December 22, 2015
    Hi John, Thanks for taking the time to write/post your program.  It was very helpful to me. Gene