Compartilhar via


WorkbookBase.SaveCopyAs(Object) Method

Definition

Saves a copy of the workbook to a file but does not modify the open workbook in memory.

public void SaveCopyAs (object filename);
member this.SaveCopyAs : obj -> unit
Public Sub SaveCopyAs (Optional filename As Object)

Parameters

filename
Object

Specifies the file name for the copy.

Examples

The following code example uses the SaveCopyAs method to save a copy of the current workbook.

This example is for a document-level customization.

private void WorkbookSaveCopyAs()
{
    this.SaveCopyAs(this.FullName + ".copy.xlsx");
}
Private Sub WorkbookSaveCopyAs()
    Me.SaveCopyAs((Me.FullName & ".copy.xlsx"))
End Sub

Remarks

Optional Parameters

For information on optional parameters, see Optional Parameters in Office Solutions.

Applies to