COM Exception : Not a valid predefined bookmark error

M

Matt

Dear Expert ,

I have a code that inserts document XML into open word documents . The
fragment that I insert have content controls , however I do not specify any
content control id's to ( I had a problem before when the existing document
had the same content control Id as the fragment inserted) . Word assigns new
content control id's based on its own internal logic . However sometimes they
get assigned content control id's that do not get recognised by the word
object model and there are exceptions thrown all over the place when I try to
access it via Addin . and I get the exception "Not a valid predefined
bookmark" .

Here is an example of one such content control id ,10289244 . Take any word
document create couple of content controls , replace one id with this one and
try to access the content control property thru code .

Can any one please explain why this is happening , this id is word assigned
during programmatic insertion of a fragment . is this a bug ? Any response or
things to try out would be much appreciated !
 

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