Re: Count of Tab characters
Re: Count of Tab characters
- Subject: Re: Count of Tab characters
- From: David Wignall <email@hidden>
- Date: Tue, 23 Jan 2001 16:28:12 +1300
on 23/1/01 7:03 AM, Bill Planey at email@hidden wrote:
>
Hi Allen,
>
>
Thanks for this suggestion. It does work --if-- the Word file is
>
relatively
>
small in size. However, most of the files I'll be working with are about
>
32-50 pages in length, and setting all of the file's text to a variable
>
causes a system freeze. I test it over and over, same result.
This proves surprisingly slow, 25 seconds to do a 48 page/944 tabs document
OMM, including trying to speed things up by turning screen updating off.
tell application "Microsoft Word"
do Visual Basic "Application.ScreenUpdating = False
theNumber = 0
With Selection.Find
.Text =\"^t\"
.Wrap = wdFindStop
Do While .Execute = True
theNumber = theNumber + 1
Loop
End With
Application.ScreenUpdating = True
MsgBox theNumber & \" tabs in this document\""
end tell
Oh, as it stands the message box turns up in Word, not AppleScript. Don't
know which you'd prefer... :)
dqw