scripting:api:text-view:selection

Selection

Property of ITextView

Returns current cursor position

Read-Write Property of type IRange

var pSelection = TextView.Selection;
TextView.Selection = pSelection;
pSelection = TextView.Selection
TextView.Selection = pSelection
CComPtr<ISelection> ppSelection;
HRESULT hr = TextView.get_Selection(&ppSelection);
hr = TextView.put_Selection(ppSelection);