WorkbookBase.RemoveDocumentInformation(XlRemoveDocInfoType) Method

Definition

Removes all information of the specified type from the workbook.

public void RemoveDocumentInformation (Microsoft.Office.Interop.Excel.XlRemoveDocInfoType removeDocInfoType);

Parameters

removeDocInfoType
XlRemoveDocInfoType

One of the Microsoft.Office.Interop.Excel.XlRemoveDocInfoType values that specifies the type of information to be removed.

Examples

The following code example removes all the workbook properties of the current workbook.

This example is for a document-level customization.

private void RemoveWorkbookProperties()
{
    this.RemoveDocumentInformation(
        Excel.XlRemoveDocInfoType.xlRDIDocumentProperties);
}
Private Sub RemoveWorkbookProperties()
    Me.RemoveDocumentInformation( _
        Excel.XlRemoveDocInfoType.xlRDIDocumentProperties)
End Sub

Applies to