copying safari text

Ok, the below script is supposed to be simple and take text from a webpage and paste it into a word doc. I got part of it here and part from Macword article, but i can’t get it to work with Westlaw.com or the “preview” part of this post. it doesn’t copy anything even though when i use the keyboard to copy that works. thoughts?

tell application "Safari"
	activate
	set selectedText to (do JavaScript "getSelection()" in document 1)
end tell

log selectedText
tell application "Microsoft Word"
	tell selection
		try
			type text text selectedText
		end try
	end tell
end tell

I’m guessing its something about the way westlaw’s page is built but why can i copy with the keyboard and not the do javascript that works on most pages?

If the keyboard copy works the use it…

tell application "Safari" to activate
delay 0.2
tell application "System Events" to keystroke "c" using command down
delay 0.2
set selectedText to the clipboard

ok i guess i should have gone back to the KISS principle. Thanks for the hint… I only beat myself up with that one for awhile. Everything works good. Even on Westlaw. I appreciate it…

tell application "Safari" to activate
delay 0.2
tell application "System Events" to keystroke "c" using command down
delay 0.2
set selectedText to the clipboard

tell application "Microsoft Word"
	activate
	tell selection
		try
			type text text selectedText
		end try
	end tell
end tell