Hi Guys,
I have a script that gets the values of a range of Excel cells, and creates a text string of them. No problems there.
The script then creates an Adobe Illustrator document with a text box, and fills the text box with the text string from Excel. No problems there.
My Excel Cell has text in that has different fonts in the same line of text.
For example:
✉ ☎ Address 1
The envelope and telephone sign are in Zapf Dingbats, and the rest is in Univers.
When the text ends up in the Illustrator document, it appears all in one font.
Is there a way to keep the fonts that are in the Excel cell, ‘true’ when it arrives in Illustrator ???
Grateful for any help you guys can give.
My script is below.
tell application “Microsoft Excel”
try
set AppleScript’s text item delimiters to space
set myWords to (value of cell “A1:A100”)
set myAddress to myWords as string
--set AppleScript's text item delimiters to ""
end try
end tell
tell application “Adobe Illustrator”
activate
make new document
-- Create a rectangle that will be used as the first text area
set theRectanglePath to make new rectangle at beginning of document 1 ¬
with properties {position:{5, 785}, height:400, width:600}
-- Create the area text object
set theText to make new text frame at beginning of document 1 ¬
with properties {name:"T1", kind:area text, text path:theRectanglePath, contents:myAddress}
-- Set the characteristics of the text associated with the newly created text frame
set properties of every word of the text of theText to ¬
{fill color:{black:100}, size:7}
--{fill color:{black:100}, text font:text font "Helvetica", size:7}
end tell