0
votes

How do you specify the parameterized value in the Microsoft Office Object Library DocumentElement.SelectNodes() method shown in the following MSDN VBA sample

http://code.msdn.microsoft.com/office/OneNote-2010-Open-Close-84193a49

The sample references a ("//one:Notebook") but it's unclear how to reference a private collection of notebooks. Specifically, what does "one" mean? What does "Notebook" mean? How would I reference a notebook named "Work"? Goal here is to enumerate amongst all sections of a OneNote file searching for Metadata. Thanks

1

1 Answers

1
votes

OneNote API is provided as an XML. The samples in the link you provided uses MSXML to parse the XML. //one:Notebook is an XPath to an XML node named Notebook and one: is the namespace. To get a notebook named Work you can query for //one:Notebook[@name='Work'].

For the XPath syntax look at here: http://www.w3schools.com/xpath/xpath_syntax.asp

For the details on OneNote XML schema look at here: http://www.microsoft.com/en-us/download/details.aspx?id=27396