Sunday, August 20, 2006

 

Referencing the OneNote 2007 APIs in Visual Studio

OneNote 2007 APIs are COM-based APIs. Luckily OneNote like other Office-based apps installs an interop dll into the GAC for .Net developers. Before we can start working with OneNote in Visual Studio we need to create a reference to the OneNote interop dll which will take care of the marshaling of data between managed .Net code and unmanaged COM code.

Creating a VS .Net references is simple. In a Visual Studio 2005 you can access the references from the Solution Explorer. If the Solution Explorer is not visible you can access it from the View menu or use the shortcut Ctrl-W, S. Figure 1 shows my Visual Studio's Solution Explorer.

Figure 1: VS Solution Explorer

To create a reference to the OneNote interop dll right click the reference node in the Solution Explorer , and select Add Reference to bring up the Add Reference Dialog as shown in Figure 2.

Figure 2: Add Reference Dialog

Select Microsoft.Office.Interop.OneNote and click the Ok button. You should see the reference listed under the Reference node in the Solution Explorer as shown in Figure 3.


Figure 3: VS Solution Explorer with OneNote reference

You can now access the OneNote API. Check back later as we work our way though the OneNote 2007 API.





Comments: Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?



website statistics