Group:  Other Microsoft Office Products ยป microsoft.public.onenote
Thread: OneNote 2007 DeleteHierarchy API - Can you delete Notebooks this way?

Geek News

OneNote 2007 DeleteHierarchy API - Can you delete Notebooks this way?
"benmca[ at ]gmail.com" <benmca[ at ]gmail.com> 6/28/2007 12:53:58 AM
On the "What's new for developers in OneNote 2007" website -
http://msdn2.microsoft.com/en-us/office/ms406042.aspx

The DeleteHierarchy API is documented as
"You can use the DeleteHierarchy method to delete any hierarchy object
(a notebook, section group, section, or page) from the OneNote 2007
notebook hierarchy."

But, apparently, you cannot delete Notebooks given the ID. I'm using
C# btw, and the docs are for the C++ api - could there be a
difference? At any rate - thought I'd ask if anyone else has
encountered this issue and found a workaround. My workaround right
now is to delete the notebook file structure from the hard drive,
which seems a touch harsh - I'd rather use the API if possible.

Thanks!
Ben

Re: OneNote 2007 DeleteHierarchy API - Can you delete Notebooks this way?
Ilya Koulchin <ikoulchine[ at ]hotmail.com> 6/28/2007 1:47:13 AM
benmca[ at ]gmail.com wrote:
[Quoted Text]
> On the "What's new for developers in OneNote 2007" website -
> http://msdn2.microsoft.com/en-us/office/ms406042.aspx
>
> The DeleteHierarchy API is documented as
> "You can use the DeleteHierarchy method to delete any hierarchy object
> (a notebook, section group, section, or page) from the OneNote 2007
> notebook hierarchy."

This appears to be a mistake in documentation. OneNote does not have
direct support for deleting a notebook. You can either delete the
notebook from the filesystem/SharePoint yourself, or you can call the
CloseNotebook API, which will remove the notebook from OneNote, but will
still keep around the actual files, so you could reopen it later.

Ilya

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