Developer: Persisting a 'handle' to a page externally
  Home FAQ Contact Sign in
microsoft.public.onenote only
 
Advanced search
POPULAR GROUPS

more...

microsoft.public.onenote Profile…
 Up
Developer: Persisting a 'handle' to a page externally         


Author: John McDonald
Date: Aug 24, 2008 08:12

Hi,

I'm working on an add-in to an external program that will write information
to a page in OneNote when that information changes in the external app. I
need to be able to always write the updated information to the same page in
the same section/notebook. Is there a way I can externally maintain a
handle/pointer/ID to a specific page in OneNote? I thought about saving the
object ID of the page (which I assume is the same as the PageID in the
various 'Page methods), but in the 'What's New for Developers in OneNote
2007' guide, it states that the object ID can change every time OneNote is
started.

The only way I can see to do this is to maintain a list of the object titles
of the full hierarchy (notebook/section group/section/page) and traverse it
down to the page I need, but this raises the problem of the user changing the
title of any of the objects in the hierarchy (e.g. renaming the section that
contains my page).

Is there any way for me to consistently get access to a specific page in
OneNote from an external application across multiple instances of OneNote?

Thanx.

John
2 Comments
Re: Developer: Persisting a 'handle' to a page externally         


Author: Ilya Koulchin
Date: Aug 24, 2008 14:37

John McDonald wrote:
> Is there any way for me to consistently get access to a specific page in
> OneNote from an external application across multiple instances of OneNote?

Try using the metadata properties (look at the one:Meta tag). Metadata
applied to the page will be visible from GetHierarchy calls, and will be
the same across all instances of OneNote. Although if the user makes
multiple copies of the section, that could lead to several pages being
tagged with the same metadata.

Ilya
no comments
Re: Developer: Persisting a 'handle' to a page externally         


Author: John McDonald
Date: Aug 24, 2008 15:02

Excellent! Thank you very much. Is there any way to use the metadata to
retrieve the object directly, or will I have to read through each page to
locate the one I want? I have read through the development info available
online, but it's not clear.

Thanx again.

john

"Ilya Koulchin" wrote:
> John McDonald wrote:
>> Is there any way for me to consistently get access to a specific page in
>> OneNote from an external application across multiple instances of OneNote?
>
> Try using the metadata properties (look at the one:Meta tag). Metadata
> applied to the page will be visible from GetHierarchy calls, and will be
> the same across all instances of OneNote. Although if the user makes
> multiple copies of the section, that could lead to several pages being
> tagged with the same metadata.
>
> Ilya
>
no comments