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: XlRemoveDocInfoTypeOne 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
- 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.