Find and Replace in Word 2008
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