• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Applying Character style in Word 2004
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Applying Character style in Word 2004
      • From: Paul Berkowitz <email@hidden>
  • Prev by Date: Re: ACROBAT 7: Scripting Default Font Size for Text Annotations
  • Next by Date: Re: Best way to get at these text elements
  • Previous by thread: Re: ACROBAT 7: Scripting Default Font Size for Text Annotations
  • Next by thread: Re: Applying Character style in Word 2004
  • Index(es):
    • Date
    • Thread