Hi Andreas, Thanks very much for pointing me to the .setSelection(aSelection) method. I've experimented with it and I can get it to work sometimes but not others. (I think the problem lies within my Form. I have macros that fire when leaving certain fields and have the effect of moving the cursor elsewhere from where I am trying to be!) I'm away for the next week, so I have run out of time. But I'm confident that I'll now be able to sort it out when I return. Regarding the MRI extension, I take it that it is similar to the XRay extension. Is it worth loading both? They seem to do both similar and different things. Thanks again, Noel -- Marion & Noel Lodge firstname.lastname@example.org On 2 July Andreas Säger email@example.com via<http://support.google.com/mail/bin/answer.py?hl=en-GB&ctx=mail&answer=1311182> global.libreoffice.org wrote: Hello, All you need is the MRI extension.
Within seconds it can point you to method
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
Hope this helps, A.S. -- For unsubscribe instructions e-mail to: firstname.lastname@example.org 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