I had this script working. I upgraded to excel 2004 and now it gives errors on just about each line.
tell application "Microsoft Excel"
Activate
Select Range "C2"
set NumberFormat of Selection to "mm/dd/yyyy"
Select Range "C11:C13"
set NumberFormat of Selection to "mm/dd/yyyy"
Close ActiveWorkbook saving Yes
Close every Workbook
Quit
end tell
The dictionaries for Word, PowerPoint and Excel have had their dictionaries completly updated. The dictionaries now no longer have upper case smashed together words and on the whole are more “AppleScript” like.
Your script works with some minor changes as follows:
tell application "Microsoft Excel"
activate
select range "C2"
set number format of selection to "mm/dd/yyyy"
select range "C11:C13"
set number format of selection to "mm/dd/yyyy"
close active workbook saving yes
close every workbook
quit
end tell