Problem with DeleteHierachy method in OneNote 2007 API

D

dyowee

Good day!

I created a ON add-in in which I create a blank notebook (without
sections/section groups) programmatically. But when I try to delete the
notebook using the DeleteHierarchy method, I get an exception that the
object/notebook does not exist, but I'm able to close that notebook with the
CloseNotebook method. Why is this so?

Thanks.
 
I

Ilya Koulchin

dyowee said:
I created a ON add-in in which I create a blank notebook (without
sections/section groups) programmatically. But when I try to delete the
notebook using the DeleteHierarchy method, I get an exception that the
object/notebook does not exist, but I'm able to close that notebook with the
CloseNotebook method. Why is this so?

OneNote is unable to delete notebooks. To delete it, you'll have to
close it, then delete it from the file system.

Ilya
 
D

dyowee

Yes ma'am. I tried this also, but if I delete the file programatically, I
would get an unauthorized access exception.
 

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