DocumentBase.RemoveDocumentInformation Method (WdRemoveDocInfoType)

 

Removes metadata, such as properties and comments, from a document.

Namespace:   Microsoft.Office.Tools.Word
Assembly:  Microsoft.Office.Tools.Word.v4.0.Utilities (in Microsoft.Office.Tools.Word.v4.0.Utilities.dll)

public void RemoveDocumentInformation(
	WdRemoveDocInfoType removeDocInfoType
)

Parameters

removeDocInfoType
Type: Microsoft.Office.Interop.Word.WdRemoveDocInfoType

One of the WdRemoveDocInfoType values that specifies what information to remove.

The following code example removes all the document properties of the current document. To use this example, run it from the ThisDocument class in a document-level project.

private void RemoveDocumentProperties()
{
    this.RemoveDocumentInformation(
        Word.WdRemoveDocInfoType.wdRDIDocumentProperties);
}
Return to top
Show: