-
Return all text from non contiguous selection
Hi All,
If a non-contiguous range is selected, the command Selection.Text will only return the last block of text added to the selection. I need to be able create a string that contains all the text that has been selected. As an added step I would also ideally like the string to also include some delimiter (space, return, comma) between each of the selected blocks so in this example assume that a user selects the text 'brown' and 'lazy dog' from the text below:
'the quick brown fox jumped over the lazy dog'
Then I would need a to have a string returned something like 'brown lazy dog'
Interestingly the command:
Selection.Copy would copy all the selected text but Selection.Text only returns the last block, in the case of the above example 'lazy dog'
Thanks
Steve Bayliss
STEOLA
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules