Group:  Other Microsoft Office Products ยป microsoft.public.onenote
Thread: OneNote 2007 NavigateTo API

Geek News

OneNote 2007 NavigateTo API
"benmca[ at ]gmail.com" <benmca[ at ]gmail.com> 6/5/2007 12:01:26 AM
I'm using the OneNote interop, trying to use the NavigateTo API, and I
may have found a bug: I have the following code:
_oneNoteApp.NavigateTo(ActiveNotebookId, curPageId,
true);

I am expecting a new OneNote window to pop up, showing page curPageId
within Notebook ActiveNotebookId. The actual behavior is the UI pops
up to the previously viewed notebook/page. I have verified that
ActiveNotebookId, curPageId are valid. Maybe I'm missing something
obvious here ;)

Flipping the last arg to false pops nothing up. What should the
expected behavior be if I flip the last arg to false?

Thanks in advance- Ben

Re: OneNote 2007 NavigateTo API
"Josh Einstein" <josh[ at ]einsteintech.net> 6/5/2007 2:42:15 PM
Yeah you got the parameters mixed up. Pass the page id in as the first
parameter, the second parameter is the object on the page you want to scroll
to I believe (which should be null if you just want to open to a page).
Since the pages are identified with guids there is no need to specify the
notebook or section.

--
Josh Einstein (Tablet PC MVP)
Einstein Technologies
Tablet Enhancements for Outlook - Try it free: www.tabletoutlook.com


<benmca[ at ]gmail.com> wrote in message
news:1181001686.287595.81610[ at ]z28g2000prd.googlegroups.com...
[Quoted Text]
> I'm using the OneNote interop, trying to use the NavigateTo API, and I
> may have found a bug: I have the following code:
> _oneNoteApp.NavigateTo(ActiveNotebookId, curPageId,
> true);
>
> I am expecting a new OneNote window to pop up, showing page curPageId
> within Notebook ActiveNotebookId. The actual behavior is the UI pops
> up to the previously viewed notebook/page. I have verified that
> ActiveNotebookId, curPageId are valid. Maybe I'm missing something
> obvious here ;)
>
> Flipping the last arg to false pops nothing up. What should the
> expected behavior be if I flip the last arg to false?
>
> Thanks in advance- Ben
>

Re: OneNote 2007 NavigateTo API
"benmca[ at ]gmail.com" <benmca[ at ]gmail.com> 6/5/2007 8:04:16 PM
Thanks Josh for the clarification. That indeed was the problem.
Ben

On Jun 5, 7:42 am, "Josh Einstein" <j...[ at ]einsteintech.net> wrote:
[Quoted Text]
> Yeah you got the parameters mixed up. Pass the page id in as the first
> parameter, the second parameter is the object on the page you want to scroll
> to I believe (which should be null if you just want to open to a page).
> Since the pages are identified with guids there is no need to specify the
> notebook or section.
>
> --
> Josh Einstein (Tablet PC MVP)
> Einstein Technologies
> Tablet Enhancements for Outlook - Try it free:www.tabletoutlook.com
>
> <ben...[ at ]gmail.com> wrote in message
>
> news:1181001686.287595.81610[ at ]z28g2000prd.googlegroups.com...
>
> > I'm using the OneNote interop, trying to use the NavigateTo API, and I
> > may have found a bug: I have the following code:
> > _oneNoteApp.NavigateTo(ActiveNotebookId, curPageId,
> > true);
>
> > I am expecting a new OneNote window to pop up, showing page curPageId
> > within Notebook ActiveNotebookId. The actual behavior is the UI pops
> > up to the previously viewed notebook/page. I have verified that
> > ActiveNotebookId, curPageId are valid. Maybe I'm missing something
> > obvious here ;)
>
> > Flipping the last arg to false pops nothing up. What should the
> > expected behavior be if I flip the last arg to false?
>
> > Thanks in advance- Ben


Re: OneNote 2007 NavigateTo API
"Daniel Escapa [MS]" <not_real[ at ]microsoft.com> 6/13/2007 9:15:37 PM
*wipes brow*

Glad to see there aren't any bugs with this, thanks Josh!

There is a small annoyance that I will spill the beans on. If you don't
have OneNote UI open and you go a NavigateTo it will cause OneNote to appear
and it will bring that window to the foreground. However if you already had
a OneNote UI window present it would not bring the OneNote window to the
foreground, it would only navigate that window and the user may or may not
see it.

If you want to ensure that the user always sees the UI you should use the
Win32 call to set the active window. Of course if you have thoughts or
ideas for the future please let me know.

Also Ben please post whatever you are working on so the whole community can
see what tool you are writing; that is if it isn't some secret work project.

Take care

<benmca[ at ]gmail.com> wrote in message
news:1181073856.633531.271650[ at ]g37g2000prf.googlegroups.com...
[Quoted Text]
> Thanks Josh for the clarification. That indeed was the problem.
> Ben
>
> On Jun 5, 7:42 am, "Josh Einstein" <j...[ at ]einsteintech.net> wrote:
>> Yeah you got the parameters mixed up. Pass the page id in as the first
>> parameter, the second parameter is the object on the page you want to
>> scroll
>> to I believe (which should be null if you just want to open to a page).
>> Since the pages are identified with guids there is no need to specify the
>> notebook or section.
>>
>> --
>> Josh Einstein (Tablet PC MVP)
>> Einstein Technologies
>> Tablet Enhancements for Outlook - Try it free:www.tabletoutlook.com
>>
>> <ben...[ at ]gmail.com> wrote in message
>>
>> news:1181001686.287595.81610[ at ]z28g2000prd.googlegroups.com...
>>
>> > I'm using the OneNote interop, trying to use the NavigateTo API, and I
>> > may have found a bug: I have the following code:
>> > _oneNoteApp.NavigateTo(ActiveNotebookId, curPageId,
>> > true);
>>
>> > I am expecting a new OneNote window to pop up, showing page curPageId
>> > within Notebook ActiveNotebookId. The actual behavior is the UI pops
>> > up to the previously viewed notebook/page. I have verified that
>> > ActiveNotebookId, curPageId are valid. Maybe I'm missing something
>> > obvious here ;)
>>
>> > Flipping the last arg to false pops nothing up. What should the
>> > expected behavior be if I flip the last arg to false?
>>
>> > Thanks in advance- Ben
>
>

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net