Applying Character style in Word 2004
Applying Character style in Word 2004
- Subject: Applying Character style in Word 2004
- From: Larry McMunn <email@hidden>
- Date: Sun, 1 Oct 2006 22:26:28 -0400
I need to apply a character style "FOOT_REF" to
footnote references that a client is simply
making superscript.
I can find the superscripts and change the
character style (apply Bold, remove Superscript,
etc.) but I can't get the Character style change
to work.
------------
tell application "Word_2004"
activate
try
set myStyle to make new Word style at active document with properties ¬
{name local:"FOOT_REF", style type:style type character}
set superscript of font object of myStyle to true
on error
set myStyle to a reference to Word style "FOOT_REF"
end try
set myFind to find object of text object of active document
clear formatting myFind
set superscript of font object of myFind to true
set content of myFind to ""
clear formatting replacement of myFind
--THIS WORKS
set bold of font object of replacement of myFind to true
--THIS WORKS
set superscript of font object of replacement of myFind to false
--THIS DOESN'T WORK
--set style of font object of replacement of myFind to myStyle
set content of replacement of myFind to ""
execute find myFind replace replace all
end tell
------------
What am I missing here?
--
Happy Automation! :-)
Larry McMunn
President
McMunn Associates, Inc.
Collingswood, NJ
Seminole, FL
Mobile: (856) 261-7018
Main Office: (866) 671-6067
FAX: (866) 636-4446
---------------------------------------------------------------
_______________________________________________
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