I believe you should use:
(text text-widget)
Hi,
Thanks for taking the time to reply.
I've not got access to my lisp environment at the moment so I can't confirm but I thought that would just retrieve the full text contents of the widget and not the selected text. But maybe I'm mistaken.
Many thanks. Phil