Get Cursor Position from WebEdit


'Get Cursor Position from WebEdit
Set objGooglePage=Browser("name:=.*Google.*").Page("title:=.*Google.*")
Set objSelection=objGooglePage.Object.Selection.createRange
Set objWebEdit=objGooglePage.WebEdit("name:=q").Object

'Display Cursor Position
objSelection.moveStart "character",-Len(objWebEdit.value)
Msgbox  Len(objSelection.text)

Set objGooglePage=Nothing
Set objSelection=Nothing
Set objWebEdit=Nothing