Word.Application word = new Word.Application();
Object missing = Type.Missing;
Object Password = "11111";
Object filename = @"C:\Users\ThinkPad\Desktop\aaa.doc";
Microsoft.Office.Interop.Word.Document wordDoc = word.Documents.Open(ref filename, ref missing, ref
missing, ref missing, ref missing, ref missing, ref
missing, ref missing, ref missing, ref missing, ref
missing, ref missing, ref missing, ref missing, ref
missing, ref missing);
if (word.ActiveDocument.ProtectionType == WdProtectionType.wdAllowOnlyComments)
{
word.Active
C# 设置word不可编辑
最新推荐文章于 2023-04-10 11:43:58 发布
本文介绍如何使用C#编程实现对Word文档进行保护,使其变为只读、不可编辑状态,以确保文档内容不被修改。
摘要由CSDN通过智能技术生成