Quantcast
Channel: General Office Development forum
Viewing all articles
Browse latest Browse all 2257

OneNote 2013: 'Microsoft.Office.Interop.OneNote.Application' does not contain a definition for 'Windows'

$
0
0

Hi guys,


when trying to understand the samples from the MSDN OneNote 2013 Developer Reference (http://msdn.microsoft.com/en-us/library/office/jj680118%28v=office.15%29.aspx) I did the following:

  • Visual Studio 2013 Update 4, creating new proejct (Winforms)
  • Set reference to Microsoft.Office.Interop.OneNote namespace (v15)
  • Wrote the following code:

namespace ont2013OM { public partial class Form1 : Form { ont.Application appOneNote = new ont.Application(); public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { uint anz = appOneNote.Windows.Count; } } }

Everythingis fine so far, getting intellisense for OneNote OM and all, but when hitting "Build" or "Debug" I get an 'Microsoft.Office.Interop.OneNote.Application' does not contain a definition for 'Windows' error for my codeline in Form1_Load.

What's that!?

Environment: Win 8.1 64bit, Office 2013 32bit, Visual Studio 2013 Update 4.


Viewing all articles
Browse latest Browse all 2257

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>