DocumentBase.RemoveDocumentInformation Method

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)

Syntax

'Declaration
Public Sub RemoveDocumentInformation ( _
    removeDocInfoType As WdRemoveDocInfoType _
)
public void RemoveDocumentInformation(
    WdRemoveDocInfoType removeDocInfoType
)

Parameters

Examples

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 Sub RemoveDocumentProperties()
    Me.RemoveDocumentInformation( _
        Word.WdRemoveDocInfoType.wdRDIDocumentProperties)
End Sub
private void RemoveDocumentProperties()
{
    this.RemoveDocumentInformation(
        Word.WdRemoveDocInfoType.wdRDIDocumentProperties);
}

.NET Framework Security

See Also

Reference

DocumentBase Class

Microsoft.Office.Tools.Word Namespace