Hi Camelot,
If you don't mind me posting a follow-up question, how would I nest the code below in your code, so as to have the results of my script written to a log file?
Any suggestions you may have will be warmly welcomed!
Cheers,
Simon
property searchReplace : {{"SearchValue_1", "ReplaceValue_1"}, {"SearchValue_2", "ReplaceValue_2"}, {"SearchValue_3", "ReplaceValue_3"}}
tell application "Finder"
set thisFolder to "Macintosh HD:Users:Quokka_61:Desktop:Excel-test"
open thisFolder
set theseFiles to every file of folder thisFolder
end tell
repeat with i from 1 to the count of theseFiles
set thisFile to (item i of theseFiles)
tell application "Microsoft Excel"
open thisFile
set thisFile to active workbook
set targetRange to used range of active sheet of active workbook
tell used range of worksheet "Sheet1" of active workbook
repeat with thisSearchReplace in searchReplace
set searchVar to item 1 of thisSearchReplace
set replaceVar to item 2 of thisSearchReplace
replace targetRange what searchVar replacement replaceVar
end repeat
end tell
end tell
close thisFile saving yes
end repeat