GetSelectionText()

To extract the first name from a Text object named fullName containing the value Mr James Smith, use the following syntax:

fullName.SetSelection(3,8);
myFirstName = fullName.GetSelectionText();
firstName.ReplaceSelection(myFirstName);

Note:
In this example, the last line of code adds the Return ValueJames from the GetSelectionText function to a Text object named firstName. The Text object now contains the text James.

Close