Hello,

All you need is the MRI extension.
http://extensions.libreoffice.org/extension-center/mri-uno-object-inspection-tool

Within seconds it can point you to method
http://www.openoffice.org/api/docs/common/ref/com/sun/star/awt/XTextComponent.html#setSelection

The .setSelection(aSelection) method takes a struct specifying the start position and the end position of your text selection.

MRI also generates snippets like this while using it:

Sub Snippet(Optional oInitialTarget As Object)
  Dim oSource As Object
  Dim aSelection As New com.sun.star.awt.Selection

  oSource = oInitialTarget.Source
  aSelection = oSource.getSelection()
End Sub



[Tutorial] Introduction into object inspection with MRI
http://user.services.openoffice.org/en/forum/viewtopic.php?f=74&t=49294

Hope this helps,
A.S.


--
For unsubscribe instructions e-mail to: [email protected]
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Reply via email to