Returning items in a range
I am having an issue with returning the items within a range. I have included the code that I am using and it seems that arange is empty or something, because I can't get it to call any of the items that are in the range.
use scripting additions
set theXLSX to (choose file of type ("org.openxmlformats.spreadsheetml.sheet"))
set theDOCX to (choose file of type {"org.openxmlformats.wordprocessingml.document"})
tell application "Microsoft Excel"
activate
open file theXLSX
set numb to display dialog "What row is the project on?" default answer "" with icon note buttons {"Cancel", "Continue"} default button "Continue"
set numb2 to (text returned of numb) as integer
tell sheet3 of document 1
set arange to range ("A" & numb2 & ":K" & numb2)
end tell
end tell
tell application "Microsoft Excel" to if it is running then quit
tell application "Microsoft Word"
activate
open file theDOCX
set myfind to find object of text object of active document
set properties of myfind to {match case:false, match whole word:false, match wildcards:false}
execute find myfind find text ("<<project>>") replace with (item 1 of arange) replace replace all
close active document saving yes
end tell
tell application "Microsoft Word" to if it is running then quit
MacBook Pro 13″