applying permissions to protected document

D

dave

Hi,

I have a protected document and I have some xml tags that can be edited
within these these tags are tags hat can't be edited. So I have looped
through the document selecting all tags and then the tag's child nodes and
running this code:

node.Range.Select()
applicationObject.Selection.Editors(Word.WdEditorType.wdEditorEveryone).Delete()

My problem is that if the child node is at the end of a table it doesn't
apply permissions properly. I've looked at the underlying xml and discovered
that the permStart and permEnd tags are incorrectly numbered at that point.

</w:r>
<ns0:Data_1_Serial_Number>
<w:permEnd w:id="5"/>
<w:r>
<w:rPr>
<w:rFonts w:ascii="GE Inspira" w:h-ansi="GE Inspira"/>
<wx:font wx:val="GE Inspira"/>
</w:rPr>
<w:t>test</w:t>
</w:r>
<w:permStart w:id="6" w:edGrp="everyone"/>
</ns0:Data_1_Serial_Number>
<w:r>
<w:rPr>
<w:rFonts w:ascii="GE Inspira" w:h-ansi="GE Inspira"/>
<wx:font wx:val="GE Inspira"/>
</w:rPr>
<w:t>.</w:t>
</w:r>
</w:p>

</w:tc>
</w:tr>
</w:tbl>
<w:p>
<w:pPr>
<w:ind w:left="0"/>
<w:rPr>
<w:rFonts w:ascii="GE Inspira" w:h-ansi="GE Inspira"/>
<wx:font wx:val="GE Inspira"/>
</w:rPr>
</w:pPr>
</w:p>
<w:tbl>
<w:tblPr>
<w:tblW w:w="4874" w:type="pct"/>
<w:tblInd w:w="108" w:type="dxa"/>
<w:tblBorders>
<w:top w:val="single" w:sz="6" wx:bdrwidth="15" w:space="0"
w:color="auto"/>
<w:left w:val="single" w:sz="6" wx:bdrwidth="15" w:space="0"
w:color="auto"/>
<w:bottom w:val="single" w:sz="6" wx:bdrwidth="15" w:space="0"
w:color="auto"/>
<w:right w:val="single" w:sz="6" wx:bdrwidth="15" w:space="0"
w:color="auto"/>
</w:tblBorders>
<w:tblLayout w:type="Fixed"/>
</w:tblPr>
<w:tblGrid>
<w:gridCol w:w="10922"/>
</w:tblGrid>
<w:tr>
<w:tc>
<w:tcPr>
<w:tcW w:w="5000" w:type="pct"/>
<w:shd w:val="pct-5" w:color="auto" w:fill="auto"
wx:bgcolor="F2F2F2"/>
</w:tcPr>
<w:p>
<w:pPr>
<w:spacing w:before="200"/>
<w:ind w:left="0"/>
<w:rPr>
<w:rFonts w:ascii="GE Inspira" w:h-ansi="GE Inspira"/>
<wx:font wx:val="GE Inspira"/>
</w:rPr>
</w:pPr>
<w:r>
<w:rPr>
<w:rFonts w:ascii="GE Inspira" w:h-ansi="GE Inspira"/>
<wx:font wx:val="GE Inspira"/>
<w:b/>
</w:rPr>
<w:t>Approver’s Signature</w:t>
</w:r>
</w:p>
<w:p>
<w:pPr>
<w:spacing w:after="100"/>
<w:ind w:left="0"/>
<w:rPr>
<w:rFonts w:ascii="GE Inspira" w:h-ansi="GE Inspira"/>
<wx:font wx:val="GE Inspira"/>
<w:i/>
</w:rPr>
</w:pPr>
<w:r>
<w:rPr>
<w:rFonts w:ascii="GE Inspira" w:h-ansi="GE Inspira"/>
<wx:font wx:val="GE Inspira"/>
<w:i/>
</w:rPr>
<w:t>All Signatories (to include the Quality Signatory):</w:t>
</w:r>
</w:p>
<w:p>
<w:pPr>
<w:ind w:left="0"/>
<w:rPr>
<w:rFonts w:ascii="GE Inspira" w:h-ansi="GE Inspira"/>
<wx:font wx:val="GE Inspira"/>
</w:rPr>
</w:pPr>
<w:r>
<w:rPr>
<w:rFonts w:ascii="GE Inspira" w:h-ansi="GE Inspira"/>
<wx:font wx:val="GE Inspira"/>
</w:rPr>
<w:t>Your signature indicates that, as a competent reviewer, you
approve this </w:t>
</w:r>
<ns0:SCRIBELabel_0_Document_Type>
<w:permEnd w:id="7"/>
<w:r>
<w:rPr>

Apologies for the formatting but as you can see the w:permStart w:id="6" tag
doesn't have an end and w:permEnd w:id="7" doesn't have a start.

Please help.
 

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