• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Excel 2004 & text color
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Excel 2004 & text color


  • Subject: Excel 2004 & text color
  • From: Larry McMunn <email@hidden>
  • Date: Sat, 9 Apr 2005 10:13:41 -0400

I have a great script to make PDFs of workbooks from my client. Sometimes some text is formatted with colored text. I need all text to be black.

With Excel X, the following works beautifully:

tell application "Excel_X"
   Activate
   set ColorIndex of Font of UsedRange of ActiveSheet to 1.0
end tell

However, Excel 2004 doesn't want to cooperate. I haven't been able to get anything to work. Following the logic in the AS document with Office 2004, it seems that the following should work:

tell application "Excel_2004"
   activate

   --THIS DOESN'T WORK:
   set color index of font object of used range of active sheet to 1

   --THESE WORK:
   set italic of font object of used range of active sheet to true
   set bold of font object of used range of active sheet to true
end tell

I have tried all sorts of variations on the above line. Any thoughts, anyone?
--

Happy Automation!  :-)

Larry McMunn
President

McMunn Associates, Inc.
Specialists in automated Data Visualization through Apple products
Collingswood, NJ

(856) 858-3440
---------------------------------------------------------------
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Excel 2004 & text color
      • From: Hanaan Rosenthal <email@hidden>
  • Prev by Date: Re: Choose * ... with timeout?
  • Next by Date: Re: Extreme performance drop if saved as app
  • Previous by thread: Re: Choose * ... with timeout?
  • Next by thread: Re: Excel 2004 & text color
  • Index(es):
    • Date
    • Thread