Jaa


Word XML Document Protection

Document Protection in Word's XML file format: it's not the kind of thing that inspires poets, but it's great stuff nonetheless. On a recent discussion alias within Microsoft, a project manager asked how to make a document unalterable, except for certain sections. The PM for XML in Word 2003 responded (I'd mention his name, but I'm not sure how public he likes to be) that using the Tools | Protect task pane would deliver the goods for locking everything down except for certain regions.

I thought I would throw in an example as well. Say I have a doc with three areas where I want people to edit. I can protect the whole document except for those three areas:

Here you can see that I have three areas in yellow that I can edit. Actually, they are surround by XML tags in a custom schema which I have not displayed here. The resulting XML looks like this (I'll show just one of the three areas):

  <title>
<w:permStart w:id="1" w:edGrp="everyone" w:displacedBySDT="prev"/>
<w:p>
<w:r>
<w:t>The XML Programming Bible</w:t>
</w:r>
</w:p>
<w:permEnd w:id="1" w:displacedBySDT="next"/>
</title>

You can see that I have my own schema in there by noticing the <title></title> element in which the text run is located.

Tomorrow I'll add some more to the topic.

The Word XML SDK has a topic on this, but most people do not know about it. End-users can also learn about this feature by just typing 'document protect' or something close to it in the Word 2003 Help task pane.

Rock Thought for the Day: I bought a biography about Jimi Hendricks last week, "A Room Full of Mirrors", and I can't put it down. The author is Charles R. Cross who wrote a biography about Kurt Cobain, "Heavier than Heaven" which I found equally absorbing. The subjects are self-evidently interesting, but Cross is a truly fine writer, bringing Jimi and Kurt to life in a way that groupie legends, press interviews, and concert reviews can never do.

Rock On