Group:  Microsoft Word ยป microsoft.public.word.oleinterop
Thread: SaveAs Xml loses protection information

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

SaveAs Xml loses protection information
Rodney Richardson 31.05.2006 11:28:01
I have a document I'm showing in a dsoFramer within a C# application. I
choose "Tools | Protect Document" from the menu, and mark the document as
read-only. I also have a section that Everyone is allowed to edit.

I call SaveAs(filename, wdFormatXML, missing...). When I reload the file,
the entire document is protected (read-only), but the section that was marked
as editable is also read-only. Is this a bug? Or am I doing something wrong?

When I try to do the same thing directly in Word 2003, the problem does not
appear.
Re: SaveAs Xml loses protection information
"Brian" <TargetedConvergence[ at ]newsgroup.nospam> 31.07.2006 06:33:52

"Rodney Richardson" <Rodney Richardson[ at ]discussions.microsoft.com> wrote in
message news:A802D101-92EE-415E-9B74-825B1C2DC104[ at ]microsoft.com...
[Quoted Text]
>I have a document I'm showing in a dsoFramer within a C# application. I
> choose "Tools | Protect Document" from the menu, and mark the document as
> read-only. I also have a section that Everyone is allowed to edit.
>
> I call SaveAs(filename, wdFormatXML, missing...). When I reload the file,
> the entire document is protected (read-only), but the section that was
> marked
> as editable is also read-only. Is this a bug? Or am I doing something
> wrong?

How are you loading the document?

In our case, we don't try to save out the protection or Editors settings.
Rather, we control those programmatically from C#. So, we load the
document into Word in the DSO Framer, and then we set the Editors
on the Range of the doc we want to be editable, then we turn on
Protection. FWIW.

Brian


Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net