• 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: Count of specific string in Word (was re: Count of Tab characters)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Count of specific string in Word (was re: Count of Tab characters)


  • Subject: Re: Count of specific string in Word (was re: Count of Tab characters)
  • From: Emmanuel <email@hidden>
  • Date: Tue, 13 Feb 2001 08:10:14 +0100

At 5:20 +0100 13/02/01, Bill Planey wrote:

>tell MS Word
> for any paragraph which contains string "zwx"
> delete entire paragraph
>end tell
>
>or:
>
>tell MS Word
> set count of paragraphs which contain string "zwx" to ParaCount
> repeat ParaCount times
> find string "zwx"
> extend selection to entire paragraph
> delete selection
> end repeat
>end tell

Just in case Word eventually can't do it, Smile can:

-------------------------- tested
tell application "Smile"
set every paragraph of window 1 where it contains "zwx" to ""
end tell
--------------------------

and

-------------------------- tested
tell application "Smile"
item 1 of (replace "zwx" with "zwx" in (get text of window 2))
end
--------------------------

(returns the number of occurrences of "zwx")

Emmanuel


References: 
 >Count of specific string in Word (was re: Count of Tab characters) (From: Bill Planey <email@hidden>)

  • Prev by Date: RE: Applescript and FileMaker
  • Next by Date: mount a afp volum
  • Previous by thread: Re: Count of specific string in Word (was re: Count of Tab characters)
  • Next by thread: Print from Folder Part 2
  • Index(es):
    • Date
    • Thread