hello everyone
I've following code, by which I continously have this error: "User-defined type not defined" (referred to first row).
I've these references, and Office 2013 (office 365) installed on my PC:
- Microsoft XML, v6.0
- Microsoft OneNote 15.0 Object library
- Microsoft OneNote 15.0 Extended Object library
What's wrong? I can't understand.
thanks
Private Function GetFirstOneNoteNotebookNodes(OneNote As OneNote15.Application) As MSXML2.IXMLDOMNodeList
' Get the XML that represents the OneNote notebooks available.
Dim notebookXml As String
' OneNote fills notebookXml with an XML document providing information
' about what OneNote notebooks are available.
' You want all the data and thus are providing an empty string
' for the bstrStartNodeID parameter.
OneNote.GetHierarchy "", hsNotebooks, notebookXml, xs2013
' Use the MSXML Library to parse the XML.
Dim doc As MSXML2.DOMDocument
Set doc = New MSXML2.DOMDocument
If doc.LoadXML(notebookXml) Then
Set GetFirstOneNoteNotebookNodes = doc.DocumentElement.SelectNodes("//one:Notebook")
Else
Set GetFirstOneNoteNotebookNodes = Nothing
End If
End Function