Reflection Desktop VBA Guide
Attachmate.Reflection.Objects Library / Attachmate.Reflection.Objects.Productivity Library / Productivity Object / ScratchPadLoad Method
The full path of the file to load into Scratch Pad.
Example
In This Topic
    ScratchPadLoad Method
    In This Topic
    Loads Scratch Pad with the contents of the specified file.
    Syntax
    expression.ScratchPadLoad( _
       ByVal filePath As String _
    ) As ReturnCode
    where expression is a variable that represents a Productivity Object

    Parameters

    filePath
    The full path of the file to load into Scratch Pad.

    Return Value

    Returns one of the following ReturnCode values:
    Member Description
    Cancelled Cancelled.
    Error Error.
    PermissionRequired Permission is required.
    Success Success.
    Timeout Timeout condition.
    Truncated The text is truncated.
    Example

    This example loads a message in the Scratch Pad when a specific screen is ready.

    To run this example, copy this code to the ThisIbmScreen code window and save a scratchpad file as ScratchPadMessage.rtf in your Documents\Micro Focus\Reflection\ folder.

    Private Sub IbmScreen_NewScreenReady(ByVal sender As Variant)
        
        Dim ScreenID1 As String
        Dim Rtn As ReturnCode
        Dim path As String
        
        'Get the string at this screen position that uniquely identifies the screen to display the message on.
        'For this example, the text at row 1 and column 38 is 'Entry Panel'
        ScreenID = ThisIbmScreen.GetText(1, 38, 11)
           
        'If this screen is the screen we want, load the file and show the Scratch Pad.
        If ScreenID = "ENTRY PANEL" Then
            
            path = Environ("USERPROFILE") & "\Documents\Micro Focus\Reflection\ScratchPadMessage.rtf"
            
            ThisIbmTerminal.Productivity.ScratchPadLoad (path)
            
            ThisIbmTerminal.Productivity.ScratchPadPanelVisible = True
     
        End If
        
    End Sub
    See Also