Share via


Caution: addictive material! Handle with care.

It was more difficult than we expected. Our fingers are exhausted, and we won't even talk about the truly frightening quantities of Mt. Dew that were consumed. The end result: a shiny pile of ones and zeros we think you'll want to meet.

Previously I hinted that Omar, David and myself have been collaborating on a nicely abstracted managed assembly that provides an object model for importing data into OneNote. But as of today, it lives!

So what does it do, you ask? Enough talk:

 using Microsoft.Office.OneNote; 
namespace Example 
{ 
   class TrivialImport 
   { 
      public static void Main() 
      { 
         // Create a new page in the section "General", with the  
         // title "Import Example".  
         Page p = new Page("General.one", "Import Example"); 
 
         // Create a new Outline, and add some content to it: 
         OutlineObject outline = new OutlineObject(); 
         outline.AddContent(new HtmlContent("Hello <i>world</i>!")); 

 
         // Add the outline to our page: 
         p.AddObject(outline); 

 
         // Commit the changes to OneNote, and set the actively viewed page: 
         p.Commit(); 
         p.NavigateTo(); 
      } 
   } 
}

Try it out for yourself: the assembly, source code, documentation, and class diagrams are all available for download here.

(Note that this is a work in progress, and as a result you may encounter the occasional bug or two. So if it eats your homework, erases all of your Tivo'd episodes of Friends, or breaks up with your girlfriend -- you have been warned. Of course, if this does occur, let me know.)

Go wild; but be careful: once you start importing, it's hard to stop.

[3/22/06: Updated URLs to point to new site.]

Comments

  • Anonymous
    June 17, 2004
    OneNote managed API

  • Anonymous
    June 17, 2004
    OneNote managed API!

  • Anonymous
    June 17, 2004
    OneNote Managed API

  • Anonymous
    June 17, 2004
    Hmmmm... I tried that sample, and it crashes with:
    Unhandled Exception: Microsoft.Office.OneNote.ImportException: OneNote is not installed on this machine!
    at Microsoft.Office.OneNote.SimpleImporter..ctor()
    at Microsoft.Office.OneNote.Page.Commit()
    at Example.TrivialImport.Main()

    What am I missing?

  • Anonymous
    June 18, 2004
    Do you have the OneNote SP1 Preview installed? (If not, you can download it from: http://www.microsoft.com/office/onenote/sp1/) DataImport is a new feature of the SP1 release.

  • Anonymous
    June 24, 2004
    The comment has been removed

  • Anonymous
    June 25, 2004
    Unfortunately, the set of supported html tags isn't well documented anywhere officially. (This is something that I can try to remedy as we prepare to ship.) I should mention that for those experimenting, you may notice that the html support is exactly the same as pasted html content from the clipboard. They're actually one and the same, so if it works when you copy and paste from IE, it should also work via an Import.

    That being said, one of the goals of the C# classes posted here is to work around some of the nuances (which is the polite way of saying bugs) of the underlying COM interface. You'll notice that we already massage HTML input in the HtmlContent class quite a bit. Are there specific tags that aren't working as you'd expect?

  • Anonymous
    July 03, 2004
    Okay, I confess, I'm not a programmer. If I register the DLL, will that do the trick or does the code have to be compiled into some sort of executable?

  • Anonymous
    July 04, 2004
    If you add it as a reference to your Visual Studio project, that should do the trick.

    Hope this helps,

    Donovan

  • Anonymous
    April 29, 2005
    Eye of OneNote Managed API, dash of providers, seive through Sharepoint event list schema, and what do you have?

    Ummm...

  • Anonymous
    April 29, 2005
    Eye of OneNote Managed API, dash of providers, seive through Sharepoint event list schema, and what do you have?

    Ummm...

  • Anonymous
    April 29, 2005
    Eye of OneNote Managed API, dash of providers, seive through Sharepoint event list schema, and what do you have?

    Ummm...

  • Anonymous
    May 09, 2005
    Last year at TechEd, I had the sweetest setup. My (at the time) new Gateway M275 TabletPC stuffed with every beta available (XP SP2 beta, Office 2003 beta, OneNote SP1 beta, InfoPath beta, etc.) was begging to be the envy of all conference attendees...

  • Anonymous
    November 15, 2005
    I really enjoyed the OneNote plugin to Outlook. I used both the Outlook and the IE plugin quite a bit. As of resent, in the last month or so, my OneNote icon in Outlook has disappeared. I have reinstalled, checked the .NET programming option for Outlook, etc.

    Do you have any ideas what I need to do to resolve this problem?

    Thanks,
    Derek

  • Anonymous
    January 30, 2006
    PingBack from http://www.onenotepowertoys.com/2006/01/31/links-about-the-onenote-api/

  • Anonymous
    February 09, 2006
    I'm a new OneNote user, and so far I love it!  I have a couple of questions/comments:

    - can it run from a USB drive (i.e. without needing to be installed on connected PC?)  It would be great for using at class for notes, then taking home.

    - what type of encription is used for the password protection?

    - can the new API be used to copy/paste from some other application?  And allow the other application to do the rendering of the inserted piece?

  • Anonymous
    March 23, 2006
    Very good details and new. keep it posted.

  • Anonymous
    June 05, 2006
    Last year the OneNote marketing team started a contest to&amp;nbsp; see how developers and enthusiasts used...

  • Anonymous
    August 17, 2006
    Last year at TechEd, I had the sweetest setup.  My (at the time) new Gateway M275 TabletPC stuffed with every beta available (XP SP2 beta, Office 2003 beta, OneNote SP1 beta, InfoPath beta, etc.) was begging to be the envy of all conference attendees..

  • Anonymous
    August 21, 2006
    This library is an easy and fun way to integrate OneNote with .NET apps. We&amp;#39;ve used it for our freeware

  • Anonymous
    January 22, 2007
    My name is Donovan Lange.  I'm a Software Design Engineer on Microsoft Office OneNote. I do not agree. Go to http://www.auditjobs.info

  • Anonymous
    January 23, 2007
    http://hometown.aol.com/bnovwebw/pillow/neck-pillow.html

  • Anonymous
    January 23, 2007
    My name is Donovan Lange.  I'm a Software Design Engineer on Microsoft Office OneNote. I do not agree. Go to http://www.autosjob.info/filiation_United%20Kingdom/hinny_England/unsportsmanlike_Torquay_1.html

  • Anonymous
    February 26, 2007
    <a href=http://spwtc3lj.tripod.com/playground-equipment/camdenton-equipment-play.html>camdenton equipment play</a> <a href=http://spwtc3lj.tripod.com/playground-equipment/playground-equipment-acc.html>playground equipment acc</a> <a href=http://spwtc3lj.tripod.com/playground-equipment/equipment-need-playgroun.html>equipment need playgroun</a>

  • Anonymous
    March 21, 2007
    My name is Donovan Lange.  I'm a Software Design Engineer on Microsoft Office OneNote. I do not agree. Go to http://www.dojobs.info/vena_Netherlands/regulation_Holland/acropolis_Amsterdam_1.html

  • Anonymous
    May 11, 2007
    http://www.forumup.us/?mforum=bookreader <a href= http://www.forumup.us/?mforum=bookreader >college text books online</a> [url=http://www.forumup.us/?mforum=bookreader]college text books online[/url]

  • Anonymous
    May 17, 2007
    I'm seeking a software that can add the context in clipboard to onenote by using hotkey,does it have be done by anyone?or i have to try to do it myself.

  • Anonymous
    June 14, 2007
    Look who's here! Be seeing you.,Look who's here! Be seeing you.,Look who's here! Be seeing you.,Look who's here! Be seeing you.

  • Anonymous
    June 15, 2007
    How are you doing on? Bye.,How are you doing on? Bye.,How are you doing on? Bye.,How are you doing on? Bye.

  • Anonymous
    July 22, 2007
    RSSBandit Plugin - RSS2OneNote

  • Anonymous
    July 28, 2007
    PingBack from http://blogsseek.com/life-insurance/2007/07/22/government-computer-news-gcn-daily-news-federal-state-and/

  • Anonymous
    April 15, 2008
    Woohoo!, I love using Onfolio but I&#39;m also starting to love using OneNote too (only wish I had a

  • Anonymous
    August 25, 2008
    The comment has been removed

  • Anonymous
    August 26, 2008
    The comment has been removed

  • Anonymous
    June 24, 2010
    Does this assembly work with OneNote 2010?  Also, I cannot get the assembly zip file download to work.  It appears that lange.officeisp.net isn't available.