0
我們以編程方式使用openxml創建word文檔。一切工作正常,但是當我們還保護文檔programactially使用OPENXML進行編輯然後將文檔的內容越來越因素決定,例如句子 نحاولاصلاحالتقريراليوموشكرا 將成爲 اليوموشكرانحاولاصلاحالتقرير使用OpenXML創建Word文檔
如果生成的文檔沒有保護,那麼一切都保持良好。
任何幫助將不勝感激。
在此先感謝。
我們使用到PROTEC文檔中的代碼是
using (WordprocessingDocument wdoc = WordprocessingDocument.Open(strPath, true))
{
DocumentSettingsPart docSett = wdoc.MainDocumentPart.DocumentSettingsPart;
docSett.RootElement.Append(new DocumentProtection { Edit = DocumentProtectionValues.ReadOnly });
docSett.RootElement.Save();
}