• 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
Find and Replace in Word 2008
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Find and Replace in Word 2008


  • Subject: Find and Replace in Word 2008
  • From: Graham Sims <email@hidden>
  • Date: Mon, 21 Jan 2008 10:22:08 +0000

Have been trying to replace the macros I used in Word X with Applescript so that I can run the same routines in Word 2008. I am trying to write a macro that will allow me to find and replace within a selected portion of text and have used the following script taken directly from the Word2004AppleScriptRef guide:

tell application "Microsoft Word"
set selFind to find object of selection
tell selFind
clear formatting
set content to "hi"
clear formatting replacement
set content of replacement to "hello"
execute find wrap find find continue ¬
replace replace all with match forward
end tell
end tell

This comes up with "Microsoft Word got an error: replacement doesn’t understand the clear formatting message."
Is anybody able to offer a solution?

Regards,

Graham
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Find and Replace in Word 2008
      • From: Michael Ghilissen <email@hidden>
  • Prev by Date: Re: How to start/restart the Finder from an AS app?
  • Next by Date: Re: Find and Replace in Word 2008
  • Previous by thread: Re: How to start/restart the Finder from an AS app?
  • Next by thread: Re: Find and Replace in Word 2008
  • Index(es):
    • Date
    • Thread