Thank you for the hint, Ilya - for anyone else curious, here's my code:
<snip> string nbName = "name of notebook"; string specialLocationPath; _app.GetSpecialLocation(SpecialLocation.slDefaultNotebookFolder, out specialLocationPath);
string newNotebookPath = specialLocationPath + "\\" + nbName;
string objId; _app.OpenHierarchy(newNotebookPath, "", out objId, CreateFileType.cftNotebook); </snip>
I was going to squirrel away data within the Notebook Id that would be global to the notebook. If there were Metadata at this level (if Notebook had a sequence of type Meta) that would work, but there is not. b
On Mar 26, 11:05 am, Ilya Koulchin <ikoulch...[ at ]hotmail.com> wrote:
[Quoted Text] > ben...[ at ]gmail.com wrote: > > Hi - I'm trying to add a new notebook in OneNote 2007 using > > UpdateHierarchy, and am having trouble. I have tried to send the > > following xml fragments in to the UpdateHierarchy method: > > You need to tell OneNote where the notebook you're trying to open is > located in the filesystem. Without you providing the path to the > notebook, OneNote is unable to determine where it should be located, and > will be unable to open it. > > > I need to programatically add a new notebook, > > specifiying it's name and, preferably, it's ID. > > Is there a particular reason you want a specific ID? > > Ilya
|