Re: Word's "Entire Document" XML tags are fragile!
- From: Cindy M -WordMVP- <C.Meister-C@xxxxxxxxxx>
- Date: Mon, 24 Jul 2006 16:05:15 +0200
Hi Brian,
I think I've figured this one out... it appears based on the vagueIt all sounds right :-)
exceptions that I am getting, that with protection on, I can't modify the
document while it is protected, including adding editable ranges. I have
modified my code to unprotect/protect the document whenever I need to make
mods; and to do:
myDoc.XMLNodes[1].Range.Editors.Add(ref editorID);
if the document should be editable by my users. There the assumption is
that the first XMLNode in the XMLNodes collection will always be the
outermost one. I can't find any documentation to that effect, but it seems
to be the case.
Does that all sound right??
One thought: if you know from the start that the user will be structuring the
file with XML tags, you could transform it to include the outerlevel tag and
the XML when opening it? (Save you from needing to fiddle with the protection
via automation.)
Actually, I think you could even use a transform instead of automation even
once the document is open...
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org
This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)
.
- References:
- Word's "Entire Document" XML tags are fragile!
- From: Brian
- Re: Word's "Entire Document" XML tags are fragile!
- From: Cindy M -WordMVP-
- Re: Word's "Entire Document" XML tags are fragile!
- From: Brian
- Re: Word's "Entire Document" XML tags are fragile!
- From: Brian
- Re: Word's "Entire Document" XML tags are fragile!
- From: Cindy M -WordMVP-
- Re: Word's "Entire Document" XML tags are fragile!
- From: Brian
- Re: Word's "Entire Document" XML tags are fragile!
- From: Brian
- Word's "Entire Document" XML tags are fragile!
- Prev by Date: Re: Preventing the Protect Document task pane from opening on attempts to edit
- Next by Date: Re: Ensuring the Style control is visible in the toolbars in our embedded Word?
- Previous by thread: Re: Word's "Entire Document" XML tags are fragile!
- Next by thread: Reliable way to find the preceding paragraph of a particular style in Word XML?
- Index(es):
Relevant Pages
|