Advertisement
vilgelmbb

DocumentProtection examples

Jan 20th, 2015
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.40 KB | None | 0 0
  1. //защита всего документа принудительно
  2. DocumentProtection.ApplyDocumentProtection(wordDoc,"Q1w2e3r4",DocumentProtectionValues.ReadOnly);
  3. wordDoc.MainDocumentPart.Document.Save();
  4.  
  5. //возможность ввода в поля форм
  6. DocumentProtection.ApplyDocumentProtection(wordDoc, "Q1w2e3r4", DocumentProtectionValues.Forms);
  7. wordDoc.MainDocumentPart.Document.Save();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement