可以是下列的 WdProtectionType 常量之一: wdAllowOnlyComments、 wdAllowOnlyFormFields、 wdAllowOnlyReading、 wdAllowOnlyRevisions 或wdNoProtection。语法expression。 ProtectionType表达 一个代表 Document 对象的变量。示例如果没有保护活动文档,该示例保护文档,使审阅者只能插入批注而不改变文档内容。vb 复制 If ...
TypeRequiredWdProtectionTypeThe type of protection to apply. NoResetOptionalVariantFalseto reset form fields to their default values;Trueto retain the current form field values if the document is protected. IfTypeis notwdAllowOnlyFormFields,NoResetis ignored. ...
publicvoidProtect(Microsoft.Office.Interop.Word.WdProtectionType Type,refobjectNoReset,refobjectPassword,refobjectUseIRM,refobjectEnforceStyleLock); Parameters Type WdProtectionType Required. The protection type for the specified document.WdProtectionType. ...
Applies one of several types of protection to the document. C# 复制 public void Protect (Microsoft.Office.Interop.Word.WdProtectionType Type, ref object NoReset, ref object Password, ref object UseIRM, ref object EnforceStyleLock); Parameters Type WdProtectionType The protection type for the ...
OpenXml.Wordprocessing 程序集: DocumentFormat.OpenXml.dll 包: DocumentFormat.OpenXml v2.7.2 文档编辑限制。 此类在 Office 2007 及更高版本中可用。 将对象序列化为 xml 时,其限定名称为 w:documentProtection。 C# 复制 public class DocumentProtection : DocumentFormat.OpenXml.OpenXmlLeafEl...
To prevent people from changing the protection settings, type a password in thePasswordbox. ClickOKwhen you're finished. Note:If you share a document with other people, you can remove personal information, such as author name and company, when you save a file. To do this...
例如,导出到 Word 将如下所示: 版本2024.2.1 之前的产品中使用的代码 var settings = new StiWord2007ExportSettings(); settings.RestrictEditing = StiWord2007RestrictEditing.ExceptEditableFields; settings.ProtectionPassword = "123456"; report.ExportDocument(StiExportFormat.Word2007, "Report.docx", settings...
例如,导出到 Word 将如下所示: 版本2024.2.1 之前的产品中使用的代码 var settings = new StiWord2007ExportSettings(); settings.RestrictEditing = StiWord2007RestrictEditing.ExceptEditableFields; settings.ProtectionPassword = "123456"; report.ExportDocument(StiExportFormat.Word2007, "Report.docx", ...
Summary: By default, Microsoft Office Word 2003 documents contain hidden data. One measure you can take when sharing documents with others is to remove the information you don't want others to see. This article presents various ways that information is stored in a document and how to remove ...
' Reprotect the document with Forms protection. ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True End Sub 第三個巨集: 指定的 AutoOpen 巨集,ENTER 鍵 加入下列程式碼的 AutoOpen 巨集。如此一來,可確保當您開啟表單範本基礎的未來...