DocumentBase.RemoveDocumentInformation(WdRemoveDocInfoType) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
从文档中移除元数据(如属性和注释)。
public void RemoveDocumentInformation (Microsoft.Office.Interop.Word.WdRemoveDocInfoType removeDocInfoType);
参数
- removeDocInfoType
- WdRemoveDocInfoType
WdRemoveDocInfoType 值之一,指定要移除的信息。
示例
下面的代码示例将删除当前文档的所有文档属性。 若要使用此示例,请在 ThisDocument 文档级项目的类中运行它。
private void RemoveDocumentProperties()
{
this.RemoveDocumentInformation(
Word.WdRemoveDocInfoType.wdRDIDocumentProperties);
}
Private Sub RemoveDocumentProperties()
Me.RemoveDocumentInformation( _
Word.WdRemoveDocInfoType.wdRDIDocumentProperties)
End Sub