Graph.SaveAs

Saves the document.

Syntax Parameters Return Value
Function Graph.SaveAs( _
    FileName As String, _
    Optional Overwrite As Variant = 0) As Boolean
  • FileName [in]

    The fully-qualified pathway to where the graph shall be saved.

    Type: String

  • Overwrite [in, optional]

    Specifies whether to overwrite the file if it already exists.

    Type: Variant

    Default value: 0

Boolean

SVB Example

Saving a backup of a graph:

Option Base 1
Option Explicit
Sub Main
    Dim g As Graph
    Set g = ActiveGraph
    Dim DirPath As String
    DirPath = g.Path
    'save a backup copy of the graph in the
    'same directory
    G.SaveAs(DirPath & r.Name & ".bak")
End Sub