WorkbookBase.RemoveDocumentInformation Method

Removes all information of the specified type from the workbook.

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

Syntax

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

Parameters

  • removeDocInfoType
    Type: 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 Sub RemoveWorkbookProperties()
    Me.RemoveDocumentInformation( _
        Excel.XlRemoveDocInfoType.xlRDIDocumentProperties)
End Sub
private void RemoveWorkbookProperties()
{
    this.RemoveDocumentInformation(
        Excel.XlRemoveDocInfoType.xlRDIDocumentProperties);
}

.NET Framework Security

See Also

Reference

WorkbookBase Class

Microsoft.Office.Tools.Excel Namespace