Count of specific string in Word (was re: Count of Tab characters)
Count of specific string in Word (was re: Count of Tab characters)
- Subject: Count of specific string in Word (was re: Count of Tab characters)
- From: Bill Planey <email@hidden>
- Date: Mon, 12 Feb 2001 22:20:39 -0600
I desperately need a way to count the number of occurrences of a
specified string in MS Word. I have a script which puts a placeholder
in certain paragraphs that have met my criteria. This placeholder is
"zwx".
I want the script to either:
delete any paragraph which is found to contain the string by
using a broad statement to do so, something like:
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
Now, I know my "code" above is wrong, I just wanted to simply express
the concept. Anyone out there with some experience with this kind of
thing?
Thanks!!!
Bill Planey