Re: Getting from Cell to Cell in excel
Re: Getting from Cell to Cell in excel
- Subject: Re: Getting from Cell to Cell in excel
- From: Andrew Oliver <email@hidden>
- Date: Fri, 23 Jul 2004 11:41:16 -0700
When scripting Excel (or any MS Office app) it helps to include the
application version you're using. There are significant differences in the
dictionaries between different versions.
That said, you might be able to do something like:
tell application "Microsoft Excel"
set theCells to every cell of worksheet 1 whose font is
"ConduitArdoise-Medium"
set font of theCells to "Conduit ITC Medium"
end tell
The idea here is to use a 'whose' clause to identify all the target cells,
then you can change them all in one go.
Andrew
:)
On 7/23/04 10:45 AM, "Jeff Lambert" <email@hidden> wrote:
>
I want to be able to get the font of a cell, then change it to another font,
>
then move on to the next until all Cell are done in a Sheet.
>
>
I get the part of checking the font and changing it if it9s this or that
>
font, but I can only do it on a specific cell, not automaticly.
>
>
I9m new to applescript so be patient with me please:-)
>
>
Here is what I9ve got:
>
>
tell application "Microsoft Excel"
>
Activate
>
Select Range "R1C4"
>
if Name of Font of Selection is "ConduitArdoise-Medium" then
>
set Name of Font of Selection to "Conduit ITC Medium"
>
else
>
if Name of Font of Selection is "ConduitArdoise-Bold" then
>
set Name of Font of Selection to "Conduit ITC bold"
>
else
>
if Name of Font of Selection is "ConduitArdoise" then
>
set Name of Font of Selection to "Conduit ITC"
>
else
>
if Name of Font of Selection is "ConduitArdoise-Italic" then
>
set Name of Font of Selection to "Conduit ITC italic"
>
end if
>
end if
>
end if
>
end if
>
end tell
>
>
TIA
>
--
>
Jeff Lambert
>
Ardoise Design Communication inc.
>
--
>
_______________________________________________
>
applescript-users mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/applescript-users
>
Do not post admin requests to the list. They will be ignored.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.