Reflection Desktop VBA Guide
Attachmate.Reflection.Objects.Emulation.IbmHosts Library / Attachmate.Reflection.Objects.Emulation.IbmHosts Library / IbmScreen Object / PasteContinue Method
Example
In This Topic
    PasteContinue Method
    In This Topic
    Pastes text leftover from a previous Paste command.
    Syntax
    expression.PasteContinue() 
    where expression is a variable that represents a IbmScreen Object
    Example
    This example gets some text from a field on a screen and pastes the text to a field that is too small to hold all the text. It navigates to the next field and pastes the remaining text in that field.
    Sub TestPasteAndContinue()
     
        Dim text As String
        Dim field As HostField
        Dim rcode As ReturnCode
     
        'Select text on row 1, starting on column 29, and ending on column 48
        ThisIbmScreen.SetSelectionStartPos 1, 29
        ThisIbmScreen.ExtendSelectionRect 1, 48
        
        'Copy the text
        ThisIbmScreen.Copy
        
        'Move the cursor to row 5 and column 19
        rcode = ThisIbmScreen.MoveCursorTo1(5, 19)
        
        'Paste the text to this field
        ThisIbmScreen.Paste
        
        'Find the next field
        Set field = ThisIbmScreen.FindField1(6, 1, FindOption_Forward)
        
        'Move the cursor to that field
        rcode = ThisIbmScreen.MoveCursorTo1(field.StartRow, field.StartColumn)
        
        'Paste the text left over to the field
        ThisIbmScreen.PasteContinue
        
    End Sub
    See Also