Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Excel conditional formatting with Applescript

61 views
Skip to first unread message

NASA_...@officeformac.com

unread,
May 19, 2009, 5:35:58 PM5/19/09
to
Version: 2008
Operating System: Mac OS X 10.5 (Leopard)
Processor: Intel

This one is really odd... I am using applescript and Excel 2008 to create some forms. Part of that involves creating a format condition. I am using the example from Microsoft verbatim:
<http://www.microsoft.com/mac/developers/default.mspx?CTT=PageView&clr=99-21-0&target=92f2472b-1a66-4035-9710-532008a0e3921033&srcid=cdb9a274-738f-4e4a-9e8c-83feda0485241033&ep=7>

The problem is the following block:

tell application "Microsoft Excel"
tell range "B1" of active sheet
try
delete (every format condition)
end try
set newFormatCondition to make new format condition �
at end with properties {format condition type: �
cell value, condition operator:operator between, �
formula1:"0", formula2:"10"}
tell font object of newFormatCondition
set {bold, italic, font color index} �*
to {true, false, 4}*
end tell
end tell
end tell

the "bold" and "italic" settings work fine, but the font color index does not. Has anyone run into this? I'm stumped. I've tried it 50 different ways and can't get it to work. More disturbing, no one else has reported any problems. Any ideas?

Thanks!

0 new messages