Excel 2004 paste command

I’ve been searching for a paste command for Excel 2004. This should be much more simple than it is.

I know that my script is doing the right things up until paste, because I tested the data in the clipboard and it is perfect.

A lot of paste inquiries dance around this subject but nothing nails it.

Help!

Dzelnio

on run
idle
end run

on idle
tell application “Finder” to set t_file to (duplicate “Macintosh HD:WordCounts.xls” to “Macintosh HD:wcounts” with replacing) as Unicode text

tell application "Microsoft Excel"
	open t_file
	set oldValue to display alerts
	set display alerts to false
	save workbook "WordCounts.xls" in t_file as Excel9795
	set display alerts to oldValue
	tell application "Microsoft Excel"
		copy range range "A:D" of the active sheet
	end tell
	close workbook "WordCounts.xls"
end tell

tell application "Microsoft Excel"
	open "Macintosh HD:wcounts:WCSlave14.xls"
	set oldValue to display alerts
	set display alerts to false
	tell application "Microsoft Excel"
		get sheet "Details"
		set cells_toPaste to {A:D}
		
	end tell
	save workbook "WCSlave14.xls"
	set display alerts to oldValue
end tell

close

return 60 * 60 -- one hour, in seconds

end idle

===
THE ERROR
set display alerts to false
get sheet “Details”
sheet “Details”
“The variable D is not defined.”

Hi,

do you know the extensive AppleScript Reference of Excel?
http://download.microsoft.com/download/3/A/7/3A70FB4B-0C6A-43E3-AAB7-AC9166B25632/Excel2004AppleScriptRef.pdf

I found it! Thanks for the reference

tell application "Microsoft Excel"
	open "Macintosh HD:wcounts:WCSlave14.xls"
	set oldValue to display alerts
	set display alerts to false
	tell application "Microsoft Excel"
		get sheet "Details"
		paste worksheet active sheet  --- THIS WAS WHAT I NEEDED
		
	end tell