August, 2006

Search
  • Engineering OneNote Blog

    Creating Toolbar Buttons in OneNote 2007

    • 25 Comments

    As I mentioned on Monday you can create toolbar buttons in OneNote 2007. This enables some great scenarios such as:

    • Checking in files or having them publish to another program
    • Run your code instead to do something with the current page
    • And more obviously

    We allow you to create a toolbar button which is either an icon or text that will sit on one of the OneNote command bars. They can appear on the standard toolbar at the end of the menus or on any other toolbar. When the user clicks on the button we will CoCreate your code (since you implement an interface we make available) and we send you the current page that was sent. You can see that it looks like this:

    Additionally you can have OneNote run your code whenever you run OneNote and we will send you events that you might be interested in. OneNote will send events for whenever the user changes some content on a page or whenever they navigate to another section/page, etc.

    We really envision many cool toolbar buttons and addins; here are some things which are in the pipeline:

    • Word Count – One of the testers on the team wrote an application which will give you the current word count of the page you are viewing.
    • Sort Pages – I am writing an app which will sort all of your page tabs in alphabetical order (still one nasty bug with subpages that I need to fix).
    • Web Export to SharePoint – Another PM on the team has written this great app which will export the current notebook as a webpage and you can easily publish it to a SharePoint site!

    So here are just 3 of the toolbar buttons that we have written and there are more in the pipeline but there are *plenty* of opportunities for you to write your own powertoys and applications. Such as:

    That being said I would like to give you all documentation on how to create your own toolbar addin. Note that this will not work unless you have B2TR and my directions are for use in C#. I will have to create another for C++ in the future (though I will have to dust off my C++ skills since I only use C# now). That being said this should help you get started right away with writing powertoys and applications

    Creating a Toolbar Addin for OneNote 2007 (DRAFT) (PDF)

    Creating a Toolbar Addin for OneNote 2007 (DRAFT) (XPS)

    In the future I plan on releasing a sample project that you can download and I will also dissect a toolbar addin that I wrote to test one of the new API calls. Please give me feedback on this and let me know what you think, I believe this will be a good starting point for most people. Once B2TR comes out then you can try your code out!

  • Engineering OneNote Blog

    Integrating with a Document Management System

    • 8 Comments

    Just last week a new paper was posted on OneNote's MSDN site: Integrating OneNote 2007 with a Document Management System. Alex Simmons, another PM on the OneNote team, has been working on this document and it is a great whitepaper helping explain how to program something that integrates OneNote and a DMS (document management system).

    I would recommend this paper to anyone who is interested in developing someone with OneNote. There are some great gems in the article such as:

    Files Are Saved Automatically

    Any changes made to the files are saved automatically. This happens on an interval, which differs based on where the file is actually stored:

    • Local drive: 5 seconds
    • UNC share: 30 seconds
    • SharePoint library: 10 minutes
    • HTTP share: 10 minutes

    By default, notebooks are stored in the user's My Documents folder.

    Working with the OneNote Cache

    When OneNote saves a change to a file, it first saves the change to the OneNote cache, and then later replicates and merges it with the actual .one file. The .one files may be stored on the local drive, on a share, or in a SharePoint library. The cache enables users to have continuous access to their notes, regardless of where the files are actually stored or if the user is online or offline. Users can make edits to files while they are offline and OneNote automatically merges the changes back to the file when the file is available again. This also prevents OneNote from writing the entire file from the cache each time replication happens. Instead, only changes are replicated and merged with the actual file.

    If your document management system supports SMB/CIFS or WebDAV, it may be possible to open the files stored in the document management system directly. However, if your version-history model is to create a copy for each version of a file, this does not work well, because OneNote continuously updates the open (and checked out) files as they are edited.

    By default, the cache file is stored at C:\Documents and Settings\user name\Local Settings\Application Data\Microsoft\OneNote\12.0.

    • Cache file name: OneNoteOfflineCache.onecache
    • Cache thicket folder name: OneNoteOfflineCache_Files

    Pasted from <http://msdn2.microsoft.com/en-us/library/aa395228.aspx 

    Nice work Alex! If people have comments on the document please comment below.

  • Engineering OneNote Blog

    Microsoft Connect, Send a Smile: your feedback & bugs

    • 4 Comments

    First of all I would like to say thank you! Many of you are submitting bugs and taking time to let us know what you think about OneNote 2007. Over the past few months as we have shipped Beta1, B1TR and Beta2 we have gotten a great amount of feedback from you all, our wonderful customers. We mainly have these avenues of feedback:

    1. OneNote Newsgroup
    2. Microsoft Connect – OneNote
    3. Office Send a Smile

    I wanted to give you all a quick rundown of what happens with the feedback that you all submit.

    OneNote Newsgroup

    With the newsgroup feedback parts of the team goes through all of the posts and looks for potential problems as well as suggestions and what people are saying. As the general beta-guy/customer feedback PM I have been looking @ most of the posts and I have forwarded them to the people who own those features. If there is a person complaining about ink I will send the newsgroup thread/post over to the people working on ink. When there were problems with note flags not being upgraded I looked into the problem and worked with the team to get a fix in. You get the point, I read your comments and they go directly to the people coding, designing and testing the features, your voice is heard.

    Additionally other people on the team look through the newsgroup posts and report back weekly on what has been going on. We try and help whenever we can but we have some great people on the newsgroup (Patrick, Ben & Erik) who reply, we generally see what people are doing with OneNote and what people are confused about.

    Microsoft Connect

    For those of you who have submitted bugs on the Connect site you are our best helpers. You all have more types of computers and more interesting ways that you are using OneNote and we want to see the issues you all are facing. Each of your bugs are examined and we look to see if they are already fixed or if we can reproduce the problem with the most recent builds.

    If there is indeed a problem we track the bug and it goes to a developer who will look @ your comments and make a fix. I know there have been many bugs that have come in and we work on the fix. Your feedback is key for this.

    Additionally many of your submit suggestions for OneNote, which is great however there isn't much we can do right now. We are all focused on finishing OneNote 2007 and because of that we aren't get your suggestions in OneNote 2007. However please let us know what you think so that we can get great customer feedback for the next release.

    Send a Smile

    Finally there are Send a Smile reports, which allows you to send us a screenshot and your comments about what happened and what you didn't (or did like). Sadly most of the reports we get are frowns, which is understandable but I love hearing what people like about OneNote as well. That being said I look through all of your Send a Smile reports and I look for potential problems. Most of them we already know about but there are some great gems in there that I create a bug and start tracking it. Finally I take all of your comments and I send them out to the team and everyone reads them.

    For more info about the Send a Smile program please see Jensen Harris' post: Where do the smiles go?

     

    I guess the moral of the story is this: the OneNote team is listening to you. Your feedback goes directly to the people who work on the product and we love your feedback. There have been many fixes we have done based on your feedback. I can't discuss all of them but I will be able to in the near future. I think the OneNote team has a great customer connection and we are looking to maintain this relationship with you all. Again thank you.

  • Engineering OneNote Blog

    Windows Desktop Search 3.0 Beta 2 Available!

    • 12 Comments

    Fresh out of the build lab and online.  Go and get it from the Microsoft Download Center:

    Windows XP: http://www.microsoft.com/downloads/details.aspx?FamilyId=0C1AE7C6-C548-4184-B575-7AB3913547D2
    Windows XP x64: http://www.microsoft.com/downloads/details.aspx?FamilyId=BB9CAF06-7BEE-4E21-B8F8-F9F92F1B842E
    Windows Server 2003: http://www.microsoft.com/downloads/details.aspx?FamilyId=C41F35B3-CFD9-4DC0-9716-4FE2DB6E9935
    Windows Server 2003 x64: http://www.microsoft.com/downloads/details.aspx?FamilyId=6270F270-8D51-494F-91A0-4754CFBDE2D3

    You will need this with Office 2007 B2TR and search is SOOO much better with this build of WDS & OneNote 2007 B2TR.  Check it out...the coverage that I have seen this far has been interesting:

    Windows Desktop Search 3.0 beta 2 released

    Yawn... New Windows Desktop Search 3.0 Beta 2 Released

    Windows Desktop Search 3.0 beta 2 is live!

  • Engineering OneNote Blog

    Sample Code/App :: OneNote Stats

    • 6 Comments

    Last Friday I was thinking about writing a small application that went out and told me how many notebooks, sections and pages that I had open in OneNote. I was thinking about this because I was looking at the new search indexer and seeing how many pages it had indexed from my notebooks. Search has been getting really good in OneNote and I am very excited about the new release which will much improved.

    Additionally I have been hearing from more people that they wanted more sample code to see how to program with the OneNote API. Since our app is still in beta I am still seeking feedback on what documentation you want. Please let me know what you are looking for and we can go from there.

    Without further ado: OneNoteStats an easy application that tells you how many items open you have in OneNote.

    Steps:

    1. Create a new console project
    2. On the Solution Explorer under References right-click, choose Add and select the Microsoft.Office.Interop.OneNote item
    3. Copy and paste the code below
    4. Compile and run

     

    Code:

    using System.Xml;
    using OneNote = Microsoft.Office.Interop.OneNote;
     
    namespace OneNoteStats
    {
    class Program
    {
    static void Main(string[] args)
    {
    //string to store all of the OneNote hierarchy XML
    string onHierarchy;
     
    //bind to OneNote via the COM Interop
    OneNote.Application onApp = new Microsoft.Office.Interop.OneNote.Application();
     
    //get the OneNote hierarchy
    //GetHierarchy(start (null for root), scope of what you want, were to put the output
    onApp.GetHierarchy(null, Microsoft.Office.Interop.OneNote.HierarchyScope.hsPages, out onHierarchy);
     
    //Create an XML Document, load the XML and add the OneNote namespace
    XmlDocument xdoc = new XmlDocument();
    xdoc.LoadXml(onHierarchy);
    string OneNoteNamespace = "http://schemas.microsoft.com/office/onenote/12/2004/onenote";
    XmlNamespaceManager nsmgr = new XmlNamespaceManager(xdoc.NameTable);
    nsmgr.AddNamespace("one", OneNoteNamespace);
     
    //Use the SelectNodes method to pass an XPath query and select the matching nodes.
    //One for each top-level item
    XmlNodeList notebooks = xdoc.SelectNodes("//one:Notebook", nsmgr);
    System.Console.WriteLine("You have " + notebooks.Count + " notebooks");
     
    XmlNodeList sections = xdoc.SelectNodes("//one:Section", nsmgr);
    System.Console.WriteLine("You have " + sections.Count + " sections");
     
    XmlNodeList pages = xdoc.SelectNodes("//one:Page", nsmgr);
    System.Console.WriteLine("You have " + pages.Count + " pages");
     
    }
    }
    }

     

    If you have any questions...this is a really simple application and I hope to have more in the near future to show how you can work with the API.

  • Engineering OneNote Blog

    OneNote Toolbar Addins

    • 1 Comments

    I have mentioned this in the past that OneNote 2007 will support toolbar addins and I have been silent on them recently.  This is because the toolbar buttons didn't work in Beta2 that came out back in May, however they will be working when B2TR comes out.

    That being said I will have the following documentation:

    1. A nice step-by-step document on how to create your own addin
    2. A simple download project to test (though you would need to change a bunch of GUIDs to make it your own)

    Looking forward to seeing what the developer community does with this.  If you have questions please let me know.

  • Engineering OneNote Blog

    Beta Update and Improved Search...

    • 12 Comments

     Incase you all haven't heard there will be an update to the Office 2007 Beta2 suite, it will be called B2TR == Beta2 Technical Refresh.  You can more information about it here:

    It will be a patch install, see here:

    For the millions that have installed the beta 2 bits please pay attention.

    1. The upgrade path to RTM will be beta 2 --> beta 2 Technical Refresh --> RTM.  I know you have probably heard me say this but I thought I would write it down (...in case I forget).  NOTE: beta 2 installs MUST upgrade to beta 2 TR.  Said another way, there won't be a supportable path directly from beta 2 to RTM.

    2. Beta 2 TR will be released as a patch to beta 2.  Therefore, for those 2 or 3 folks that haven't installed beta 2 because you are waiting for beta 2 TR, well guess what, you'll need to install beta 2 anyway and then apply the beta 2 TR patch.

    3. Upgrading to RTM will require an uninstall of beta 2 TR, and a registry key modification prior to installing the RTM bits.

    From: SharePoint 2007: The Road from Beta 2 to RTM by Steve Caravajal's Ramblings.

    I wanted to give you all an update and I also wanted to tell you all that search will be much improved in this next release and of course you can expect that Windows Desktop Search 3.0 Preview will be improve too.  We are even adding a new task pane to help you see the indexing status:

    You can get to it from here:

     

    Sorry about the image quality, the bugs of using Windows Live Writer (overall it rocks, just this minor image bug)

    This should help with all of those people who were having problems with Windows Desktop Search 3.0 Preview which has gotten much better.

  • Engineering OneNote Blog

    Good documentation? What have you liked?

    • 4 Comments

    I am looking for any pointers to some well documented APIs. I have been getting more requests for information on the OneNote 2007 import/export API and I would like to have an example of a great API that I can look to for examples. My question for you all is what is a good API? What is something you have felt like you got all of the information that you needed to program against the API?

    My personal experience has always been to search on the web for examples and specifics and also to try things out myself. I can't just write 100 lines of code without testing it. I usually do this small iterative approach to see what works and what doesn't. Maybe that is how everyone works, that would be interesting to see how master programs actually do it. Maybe some anthropologists did this already, but I digress.

    What is a good API? Was the OneNote 2003 import API well documented? Please give me feedback on the current articles What's New for Developers in OneNote 2007 (Part 1 of 2) & What's New for Developers in OneNote 2007 (Part 2 of 2). Thank you!

  • Engineering OneNote Blog

    OneNote Notebooks on USB/SD cards

    • 0 Comments
    Looks like David, another program manager on the team, wrote about how to get OneNote Notebooks on USB drives and SD cards.  Check out the post for more details, this is pretty cool stuff to be honest and it works even when Windows gives your USB drive another drive letter than what it was using earlier.
  • Engineering OneNote Blog

    Latest round of what bloggers are saying about OneNote 2007

    • 0 Comments

    Mike, our Test Manager, reads more information than I do and he collected the following posts about OneNote 2007 so I thought I would send them along! Thanks Mike!

        

    Former MS Blog Guru, Robert Scoble's exit interview "Here's another way to look at it: today you can go to Google, search "OneNote blog" and find Chris Pratley who runs the OneNote team. You can leave him a comment and tell him you think his product sucks. And you can see how he, and his team, reacts to that".   

    "Much as I like (Office) 2007, I am sorely tempted to return to 2003, except that OneNote is sooooo bloody good in the 2007 version"   

    "Getting Things Done with OneNote12"  

    Fairly in-depth ON2007 review by blogger, with good feedback on shared notebooks and sharing sessions   

    "One of the coolest features in OneNote 207 is the ability to link to just about anything! "  

    "My favourite bits so far? OneNote 2007 

    "Technology for Teachers"   

    "The main subject of this post is leveraging the extendability of OneNote. Or "it's really easy to fix OneNote to suit your needs."

       

  • Engineering OneNote Blog

    Take the Word 2007 Default Font survey

    • 1 Comments

    I just saw this on Joe Friend's blog:

    The Microsoft Word team needs your help!

    As many of you know, we have changed the look of the default document in Microsoft Word 2007. Today we are interested in collecting insight and perceptions of the new default fonts in Word.

    Please take our survey, it won't take more than 5 minutes to complete. Only those of you who have installed and used Office 2007 Beta 2 need apply.

    Click here to participate

    This feedback is important and meaningful as we gain insight into the usage of Office 2007. Thanks for your help!

    I would encourage all of you who have been beta testing Office 2007 to submit your feedback!

  • Engineering OneNote Blog

    OneNote @ the Microsoft Office System Developers Conference

    • 4 Comments

    I was just looking at the Office MSDN site and I saw that they have a section up there for the Microsoft Office System Developers Conference 2006, including videos.  I was honoured to speak at this conference and I introduced the OneNote API for the first time.  I just saw that my video was posted online, see here:

    Office Developer Center > Microsoft Office System Developers Conference 2006 > Client apps:

    CD310—OneNote 2007: Introducing OneNote Programmability and How To Develop Solutions and Extensions

    Presenter: Daniel Escapa; 61 minutes (202 MB)
    Get an introduction to the new OneNote 2007 API, now offering full data export/import and automation functionality.

    Just click on the link and it will download/open the WMV of my presentation.  You can't see me, thankfully, but you can see my slides, the demos and a voiceover explaining it all.  Please excuse me if I sound nervous this was my first presentation and I wasn't sure how I was going to do.  Please check this out, I also heard from some people that they wanted to see demo code, you can see the samples here in the video and I also have the code posted here: OneNote 2007 API Sample Code & Demos from TechEd.  Yes I did just copy a lot of samples from one conference to the next : )

    If you just want to learn about the API please go to 11:10 where I end the product demo and go into the API.

  • Engineering OneNote Blog

    How to move or to copy your note flags to another computer

    • 0 Comments

    I just saw that the following Knowledge Base (KB) article was published: How to move or to copy your custom note flags to another computer in OneNote 2003. I know some people wanted to move their note flags from one computer to another. This article should be helpful for them. I also wanted to comment that this still works in OneNote 2007 (though just in the 12.0 folder).

  • Engineering OneNote Blog

    Final OneNote 2007 Schema Namespace

    • 1 Comments

    As I posted earlier you can find the 2007 Office System: XML Schema Reference (Beta 2) available online.  This download includes the bare-bones information regarding the OneNote 2007 XML Schema that was released for Beta2.

    I wanted to make a quick post and give everyone a heads up: if you develop anything with the betas of OneNote 2007 you will need to change your code to have the final OneNote 2007 namespace (when OneNote 2007 goes to market).

    For example right now the OneNote XML schema name space is this:

    http://schemas.microsoft.com/office/onenote/12/2004/onenote

    So if you are importing anything into OneNote you need to have this in your XML and if you export anything with OneNote 2007 Beta2/B2TR that is what the output XML will contain.  This is the beta version of the namespace and it will be changed.  The plan is to have the final namespace be:

    http://schemas.microsoft.com/office/onenote/2007/onenote

    However this could change, though I doubt it.  Just a heads up if your code works great with B2TR and then doesn't import into the final version of OneNote.  Also make sure that if you store any XML of OneNote pages (not recommended) that you get them into OneNote before the final schema changes.  Let me know if you all have questions!

  • Engineering OneNote Blog

    Using GetSpecialLocation with the OneNote API

    • 1 Comments

    I just got the following question from someone and I thought I would respond with a blog post. Actually I had this _exact_ same question just a few weeks ago; here is the question:

    Using OneNote Interop I use GetSpecialLocation with the SpecialLocation.slUnfiledNotesSection parameter and receive what appears to be the full path for the Unfiled Notes section. I then attempt to create a new page using the value I received from GetSpecialLocation. I receive a 0x80042004 which appears to be section does not exist. Yet the .one file is at the location returned by the GetSpecialLocation call.

    This is a great question and I would like to explain things:

    • The GetSpecialLocation allows you to find the items that are open in OneNote but might not appear in the OneNote hierarchy because these items (Unfiled Notes, backup folder & default notebook location) can all appear outside of your notebooks.
    • GetSpecialLocation always returns a path which you cannot use with the other OneNote API calls, since the other calls always use the OneNote GUIDs (unique IDs).

    Instead you will want to do the following:

    • GetSpecialLocation to get the string
    • Call OneNote to open the location and you will then have the ID

    The code looks like this:

    OneNote.Application onApp = new OneNote.Application();
    string unfiledSectionPath;
    onApp.GetSpecialLocation(OneNote.SpecialLocation.slUnfiledNotesSection, out unfiledSectionPath);
    string unfiledSectionID;
    onApp.OpenHierarchy(unfiledSectionPath, null, out unfiledSectionID, OneNote.CreateFileType.cftNone);

    Now you have section ID in the variable unfiledSectionID. You can then use that to call CreateNewPage or use it in the XML that you create yourself. If you have questions please post in the comments or contact me.

  • Engineering OneNote Blog

    What I am beta testing...

    • 4 Comments

    What I am currently beta testing:

    1. Office 2007
    2. Windows Vista
    3. Office Communicator 2007
    4. Mozilla Firefox / Bon Echo 2.0
    5. Windows Internet Explorer 7.0
    6. Windows Desktop Search 3.0
    7. Exchange 12 (for the backend)
    8. My own OneNote PowerToys

    I love trying new software, it is great!  If you have other suggestions about what I should try please let me know!

Page 1 of 1 (16 items)