InDesign: Proper way to get an object reference of text?

I am struggling with selecting a range of characters. Maybe somebody can explain why I am not getting the range of text I am after, such as {text from character -7 to character -1 of text flow id 176 of document “Untitled-1”}. Then maybe I can move on to the selection part”which is another concern.

tell application "Adobe InDesign CS4"
	tell document 1
		set parentStoryID to story 1
		set wordCount to "7" -- this number will come from a previous part in the script
		set wordCount to "-" & wordCount as number
		--stuck on the next few lines when trying to get an object reference of range of text items? Adobe InDesign CS4 got an error: Invalid value for set property 'selection'. Expected list of objects, object or nothing, but received (text, text, text, text, text, text, text).
		
		set theTaggedText to object reference of (characters wordCount thru -1) of text frame 1
		set selection to theTaggedText
		gedText
	end tell
end tell

Hi Jeffkr:

I reworked the syntax a little and the following should work fine for you, unless something has changed between CS3 and CS4.

tell application "Adobe InDesign CS3"
	tell document 1
		set parentStoryID to story 1
		set wordCount to "7" -- this number will come from a previous part in the script
		set wordCount to "-" & wordCount as number
		set theTaggedText to object reference of (text from character (wordCount) to character -1) of text frame 1
		set selection to theTaggedText
	end tell
end tell

Very NICE! “Text from Character” - I would never have guessed I needed that. Thank you very much.