A bulk image importer powertoy for OneNote 2010
"Vince"
wrote to me a while back and asked if there was any way to update the text
importer to import JPG files. It
seems he had hundreds of these files for an anatomy class and was getting
frustrated with copy/pasting them one at a time into OneNote. It turns out it was fairly simple to make the
needed changes, so here is the updated tool I wrote. It works much like the text importer - browse
to the folder that holds the files, select the images you want to import
(CTRL+A will select everything in the folder) and then Import. Unlike the text importer, you actually have
to select the files you wish to import - it won't automatically detect the
images in the folder. It may be easiest to move all the files you want to import into one folder before running this utility. If someone wants
to update it to iterate through all supported images, feel encouraged!
This uses the same
tree control I've been using for awhile to let you choose where to import
them. It uses the file name of the image
for the page name and imports one image per page it creates.
I also added some
code to import the image at the same size in pixels as it exists on the hard
drive. If the image is 1300 pixels wide
and 900 pixels tall, I use that as the height and width of the imported image. And if it matters to you, I import them as
page level objects rather than putting them in outlines. This all serves to keep the images from being
"too small" when imported.
Although Vince only
needed to import JPG files, the same code works for other image files, so this
toy will import BMP, JPG, GIF or PNG files.
Update: as of Feb 9, this will now allow for the import of TIFF files.
There is no setup for this toy. Just download the file from below my signature, unzip it and run the EXE. I'll post the code next week since Thursday is a day off for us here in the states.
Enjoy!
Questions, comments, concerns and criticisms always
welcome,
John
Comments
Anonymous
December 31, 2010
Great work John, this sort of stuff helps show how flexible OneNote really is. Looking forward to the source code for this one!Anonymous
January 01, 2011
This is a very useful piece of work. I scan a lot of course notes into OneNote and this makes it significantly easier.Anonymous
February 05, 2011
I want to import tiff photos into OneNote, but before importing, I want them resized smaller and then saved as compressed jpgs. Can this be made possible?kkrugh@gmail.comAnonymous
February 08, 2011
@Kent It is easy to use any photo editing software to do this ;) can also change names fix colors in a bulk processing way.I would love the ability to control how many photos per page (all on one page, 5 per page, etc...) for this powertool.Thanks,~AaronAnonymous
February 09, 2011
kkrugh,I added tiff support. Converting to JPG is beyond the scope of this addin. Since I put them in as page level, I specifically wanted to avoid resizing them - might be interesting to think about, though.Anonymous
March 27, 2011
The file seems to be corrupted--it wouldn't open in my decompression program (7-zip).Anonymous
August 07, 2011
Source code?Anonymous
September 15, 2011
Sadly, I believe I have lost the code for this. I had it on a USB stick and can't find it any longer...Anonymous
May 29, 2012
Bummer; I"d really like to see the code.I'm using the ON API in PowerShell and got the XML working to import text, but am having trouble with images as they seem to be stored separately in Base64.Can I just put the Base64 in data tags or is there some other way to pass the image?Anonymous
May 30, 2012
Just use the spy tool (or write your own) to get the XML of a page that has an image. Then you can see the xml needed for the base64 data. Something like this: <one:Image format="png" > <one:Data>iVBORw0KGgoAAAANSUhEUgAAAAgAAAAHCAIAAAC6O5sJAAAAAXNSR0IArs4c6QAAABZJREFUGFdj/P//PwM2wIRVFCg4oBIACo8DC8wqehIAAAAASUVORK5CYII=</one:Data> </one:Image>This is a small (7x7 pixel) image. One other tip - be sure to get binary data if you query the page xml so you can see this.Anonymous
July 16, 2012
Good afternoon John, very good tool!would you post the source code?Anonymous
November 27, 2013
Is there a bulk importer to import contents from RTF files. I got thousands of files that I need to import to OneNote into single tabs or pages.Anonymous
November 28, 2013
No there is not (to my knowledge). RTF is a very rich format and would need to run through an RTF to HTML converter to get this to work.I can think of 2 options.Print to OneNote. Not as silly as it seems since OCR will work for searching the documents.2.You could use autohotkey (www.autohotkey.com) to write a macro to open each file, then select all/copy/paste to OneNote.Anonymous
January 29, 2014
I need to do the opposite. I inserted dozens of screen shots and I'd like to save them all to out disk so I can make thumbnail pages and sort them. I could use the time as the name... maybe prefixed with the section name. A batch export would be great ;)BTW Your blog is the only place I've found for One Note source code--thank you!But why isn't there any VSTO videos on One Note on Channel 9?Anonymous
January 30, 2014
The images, if they are more than 10K or so, are saved in your cache folder but in a very annoying way. They all have a GUID name and no three letter extension, so you might be able to write some code to see which of these files are images and make thumbnails that way. Sorting by time may help find them here...Anonymous
February 10, 2014
Wow, sorry I didn't check back here sooner; thanks John! That was a fast reply and it worked just fine.BTW is there an offical wish list for features for future versions of OneNote?Anonymous
February 10, 2014
We're always interested in suggestions - feel free to email me with the link in the upper right.Anonymous
March 21, 2014
Unfortunately, doesn't work in Outlook 2013. Just creates an "Untitled Page". :-(Anonymous
March 21, 2014
Right - I never updated this to 2013...Anonymous
June 05, 2015
Would be nice if you did, this looks like one awesome addon I'd love to use. :)Anonymous
July 30, 2015
Dis you find the source code? Did you update to 2013?