Applescript

A

aemq000

Version: 2008
Operating System: Mac OS X 10.5 (Leopard)
Processor: Intel

I want to format the axis numbers to Bookman Old Style font size 18 using Applescript. I can do the titles (see below) but not the numbers on the axis. Everything else in my script works, but I also can't figure out how to set the weight of the axis line (I want it to be darker).

Here is the first part of it:

tell application "Microsoft Excel"
activate chart

tell active chart
set chart type to xy scatter lines no markers
tell its lines
set weight to 7
end tell
--'Add Titles and Format Chart and Axes
set has title to true
tell its chart title -- needs 'its !!
set caption to "T"
tell font object
set name to "Bookman Old Style"
set font size to 18
set bold to false
end tell
end tell

set categoryAxis to get axis axis type category axis ¬
which axis primary axis
tell categoryAxis
set has title to true
set has major gridlines to true
set has minor gridlines to true

tell its axis title -- needs 'its' !!
set caption to "X "
tell font object
set name to "Bookman Old Style"
set font size to 18
set bold to false
end tell

end tell
end tell

any help would be wonderful...
 
R

Ray Press

G'day...
Sorry to jump in like this but you're the first person I've found who's
talking about Applescript... While I am no expert, you may find the
following reference useful: AppleScript Reference Guides for Word, Excel and
PowerPoint, free, at the Developer Center on their MacTopia website:
<http://www.microsoft.com/mac/resources/resources.aspx?pid=asforoffice>.

That said.. I'm looking for some help myself... If you could help, or point
me somewhere that could, I'd be very grateful...

I am trying to convert a user defined VBA function from Excel 2007 (Windows)
to Applescript for Excel 2008, but don't know how to reference a variable in
a given cell... For example, in Windows Excel I would select a cell and
then execute the function which would ask me for a variable (so I would
click on the cell where the amount was) and the function would then convert
that amount accordingly and display the result in the original cell I had
selected... My Applescript code is clearly missing the initial code needed
to make Excel 2008 respond in a similar way.. Here is my Applescript code:

on Taxdue08(Salary)
if Salary is greater than 180000 then
set theTaxDue to ((58000 + (Salary - 180000) * 0.45) + (Salary *
0.015))
else if Salary is greater than 80000 then
set theTaxDue to ((18000 + (Salary - 80000) * 0.4) + (Salary *
0.015))
else if Salary is greater than 34000 then
set theTaxDue to ((4200 + (Salary - 34000) * 0.3) + (Salary *
0.015))
else
set theTaxDue to (((Salary - 6000) * 0.15) + (Salary * 0.015))
end if
return theTaxDue
end Taxdue08

I would appreciate any help you can offer....

Cheers
Ray
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top