• 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
Re: UI scripting: Problematic removal of unwanted Word footnote returns
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: UI scripting: Problematic removal of unwanted Word footnote returns


  • Subject: Re: UI scripting: Problematic removal of unwanted Word footnote returns
  • From: Axel Luttgens <email@hidden>
  • Date: Fri, 11 Nov 2011 15:56:49 +0100

Le 10 nov. 2011 à 00:59, Roy McCoy a écrit :

> [...]
> Bret and I have been discussing in indesign-talk how to deal with a problem I've had recently with Word's adding unwanted footnote returns that strangely can't be removed using Replace All.

Hello Roy,

Do you mean that your copy of Word suddenly started to add those return characters?
No way to find the cause and get rid of the problem?


> None of the three QuicKeys macro sequences I created for this could handle it; we found that Keyboard Maestro could, but the only repeat function I could find in that program couldn't run the sequence faster than once per second, which meant it took over a half hour to remove the returns in all the 1900 footnotes of the book concerned. The job involved has already been done twice and I hope the second time was the last, but for possible future occasions I'm still interested in the UI-scripting possibility suggested by Bret.
>
> [...]
>
> It seems like such a simple thing to do, but it's being so obstinately resistant. Anybody know how to make it work?

There's also the AppleScript way, for example:

	tell application "Microsoft Word"
		tell document 1
			repeat with fNote from 1 to (count of footnotes)
				tell text object of footnote fNote
					if content ends with return then
						set content to text 1 thru -2 of (get content)
					end if
				end tell
			end repeat
		end tell
	end tell

I'm really not fluent with Word's scripting model, so the above is certainly sub-optimal... but it works here on a short document in Word 2008.

HTH,
Axel


 _______________________________________________
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: UI scripting: Problematic removal of unwanted Word footnote returns
      • From: Paul Berkowitz <email@hidden>
References: 
 >UI scripting: Problematic removal of unwanted Word footnote returns (From: Roy McCoy <email@hidden>)

  • Prev by Date: Re: Add metadata to an existing QuickTime Movie
  • Next by Date: Re: Add metadata to an existing QuickTime Movie
  • Previous by thread: Re: UI scripting: Problematic removal of unwanted Word footnote returns
  • Next by thread: Re: UI scripting: Problematic removal of unwanted Word footnote returns
  • Index(es):
    • Date
    • Thread