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

Most invariant way to reference a page in OneNote API

$
0
0

I am trying to write a .NET application that uses a OneNote notebook as a rich database for stored emails and attachments backed by a SQL index that stores categories along with a page address I need to rapidly navigate to a page through the API. I am trying to determine the best page address field that can be extracted via the API to store in that index for referencing a page in an unambiguous way. I have run into issues using the standard stringPage Names (literal page labels in the xml),PageID, and PageURL:

Page Names: The .NET API will return multiple PageIDs if there are duplicate page names. I suppose I could filter by date but this is not an ideal solution...

PageID: My onenote "onetoc2" file lives on a sharepoint drive. Whenever that book gets unloaded from the onenote application, when I reopen the same file, PageIDs will no longer work when opened from through the API. I have tested this using:

App.Windows.CurrentWindow.CurrentPageId

and this indeed changes upon closing and reopening the notebook file. This will not do if the sharepoint store is kicked offline, and I need to reload.

Page URL: This works nicely along with NavigateToURL(...) except I don't know how to programatically extract the relevant URL from the onenote API for a given page, and I don't believe the GUIDs correspond in any obvious way to the Section or Page IDs.

Does anyone have any suggestions or solutions? Any help would be appreciated.


Viewing all articles
Browse latest Browse all 2257

Trending Articles



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