Protecting documents with OpenXML SDK 2

I am creating a DOCX file programmatically using OpenXML SDK v2. One of the requirements of the document is its protection to avoid editing.

This is done with a DocumentProtection object, for example:

new DocumentProtection
{
    Edit = DocumentProtectionValues.ReadOnly,
    Enforcement = BooleanValues.One,
    CryptographicProviderType = CryptProviderValues.RsaFull,
    CryptographicAlgorithmClass = CryptAlgorithmClassValues.Hash,
    CryptographicAlgorithmType = CryptAlgorithmValues.TypeAny,
    CryptographicAlgorithmSid = 4,
    CryptographicSpinCount = 50000,
    Hash = hash,
    Salt = salt
}

      

This works fine when the document is opened in Word 2007, but when opened in Word 2003 with the Compatibility Pack, the protection may be removed without entering a password.

Online it looks "by design", or at least expected.

Does anyone have any clever ideas for password protection tactics when viewing in Word 2003?

+2
c # office-2007 openxml


source to share


No one has answered this question yet

Check out similar questions:

3
.NET OpenXML SDK 2 RunProperties - Null
2
Password protected OpenXml Word document saved as binary password, password protected Word
2
Open protected Word document with OpenXML
1
OpenXML SDK open source throws a StackOverflowException
1
Save OpenXml document programmatically as a previous version (Word 2007)
0
C # How to insert frame in wordprocessingdocument using openxml sdk v 2.5
0
Styling Content Control in Word Document using OpenXML
0
Complete Word template and save as pdf with openxml and openoffice
0
Using VBA, open an OpenXML (.docx) document in Word 2003 where the extension is not .docx or.docm
0
Use OpenXML to create a .DOCX containing an image that works with Word 2007



All Articles
Loading...
X
Show
Funny
Dev
Pics