Share via


DocumentBase.RemoveDocumentInformation(WdRemoveDocInfoType) Method

Definition

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

public:
 void RemoveDocumentInformation(Microsoft::Office::Interop::Word::WdRemoveDocInfoType removeDocInfoType);
public void RemoveDocumentInformation (Microsoft.Office.Interop.Word.WdRemoveDocInfoType removeDocInfoType);
member this.RemoveDocumentInformation : Microsoft.Office.Interop.Word.WdRemoveDocInfoType -> unit
Public Sub RemoveDocumentInformation (removeDocInfoType As WdRemoveDocInfoType)

Parameters

removeDocInfoType
WdRemoveDocInfoType

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

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

Applies to