Applescript question: changing format of selection...

A

Andrey_Kazak

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

Greetings!

I entered a long text in an active cell. Then I selected a part of text in the active cell. Now I want to write a script which changes format of selected text or part of the cell.

Can you help me to do it please?
 
A

Andrey_Kazak

Here is the needed code for characters XXX-YYY in an active cell:

tell application "Microsoft Excel"
tell font object of (characters XXX thru YYY of active cell)
set subscript to true
end tell
end tell

But how to extract XXX and YYY from the current selection of text in the cell?
 
D

Daiya Mitchell

You might repost the question in the Excel dedicated group. Also search
here:
http://www.microsoft.com/mac/developers/default.mspx

and download the Excel 2004 AppleScript Reference and search that--it
may have more samples than the Migration Guide and might turn up a way
to address the command to selected text rather than extracting XXX and YYY.
 

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