Reflection Desktop VBA Guide
Attachmate.Reflection.Objects.Emulation.OpenSystems Library / Attachmate.Reflection.Objects.Emulation.OpenSystems Library / Terminal Object / SaveAs Method
The fully qualified file path of the file you want to save. The file must be saved in a trusted location.
Example
In This Topic
    SaveAs Method (Terminal)
    In This Topic
    Saves all settings to the specified file.
    Syntax
    expression.SaveAs( _
       ByVal filePath As String _
    ) As ReturnCode
    where expression is a variable that represents a Terminal Object

    Parameters

    filePath
    The fully qualified file path of the file you want to save. The file must be saved in a trusted location.

    Return Value

    One of the following ReturnCode enumeration values.

    Member Description
    Cancelled Cancelled.
    Error Error.
    PermissionRequired Permission is required.
    Success Success.
    Timeout Timeout condition.
    Truncated The text is truncated.

    Example
    This example opens a session, saves it with a new file name to effectively copy it, and closes the session without saving it.
    Sub OpenAndSaveReflectionOpenSystems()
        'Declare application, terminal, and view object variables:
        Dim app As Attachmate_Reflection_Objects_Framework.ApplicationObject
        Dim terminal As Attachmate_Reflection_Objects_Emulation_OpenSystems.terminal
        Dim view As Attachmate_Reflection_Objects.view
        Dim rcode As ReturnCode
        Dim path As String
        
        path = Environ("USERPROFILE") & "\Documents\Micro Focus\Reflection\"
         
        'Get a handle to the workspace
        Set app = GetObject("Reflection Workspace")
                     
        'Open a session document file
        Set terminal = app.CreateControl(path & "demo.rdox")
           
        'Create a view to display the session
        Set view = ThisFrame.CreateView(terminal)
        
        'Save the session with a new name
        rcode = terminal.SaveAs(path & "myNewSession.rdox")
        
        'Perform other commands
        
        'Close the session
        terminal.Close CloseOption_CloseNoSave
       
    End Sub
    See Also