Adding text selection into a variable

How can I place a selected word in a text field in a variable? I cannot come up with a word that could do this so I could search for this :slight_smile:

What I want to do is use the selected text by a Method that I added to the ContextualMenu. I have the ContextualMenu to work, all I need now is a way to use the selected text with it.

Use the SelectedText property:

Dim txt As String = TextArea1.SelectedText

This works great, thanks!