Accessing font objects in Excel with Applescript
Hello together,
why doesn´t the first form of the command below work while the second does?
tell application "Microsoft Excel"
[...]
-- first form
set {bold, font size} offont objectofrange "A1:E1" ofsheet "my_sheet" to {true, 12}
-- second form
tell font object of range "A1:A4" of sheet "my_sheet"
set {bold, font size} to {true, 12}
endtell
end tell
I get an Applescript error:
Can’t set {«class bold» of «class XftO» of «class X117» "A1:E1" of «class X128» "my_sheet" of «class 1172» of application "Microsoft Excel", size of «class XftO» of «class X117» "A1:E1" of «class X128» "my_sheet" of «class 1172» of application "Microsoft Excel"} to {true, 12}. Access not allowed.
Best regards
macmartin