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
- removeDocInfoType
Type: Microsoft.Office.Interop.Word.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 Sub RemoveDocumentProperties()
Me.RemoveDocumentInformation( _
Word.WdRemoveDocInfoType.wdRDIDocumentProperties)
End Sub
private void RemoveDocumentProperties()
{
this.RemoveDocumentInformation(
Word.WdRemoveDocInfoType.wdRDIDocumentProperties);
}
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.