Ejemplo n.º 1
0
 /// <summary>
 /// 姚龙生  只读模式方式
 /// </summary>
 /// <param name="password"></param>
 public void LockDocument(string password)
 {
     if (WordDoc != null)
     {
         object pw = password;
         WordDoc.Protect(Word.WdProtectionType.wdAllowOnlyComments, ref MissingType.NoReset_False, ref pw);
     }
 }
Ejemplo n.º 2
0
        public void FormProtect(ref object PassWord)
        {
            object missing = System.Reflection.Missing.Value;

            oDoc.Protect(Word.WdProtectionType.wdAllowOnlyFormFields, ref missing, ref PassWord, ref missing, ref missing);
        }