OneNote 2007 DeleteHierarchy API - Can you delete Notebooks this way?

B

benmca

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
 
I

Ilya Koulchin

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top