• 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 Tab characters
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Count of Tab characters
      • From: g3pb <email@hidden>
References: 
 >Re: Count of Tab characters (From: Bill Planey <email@hidden>)

  • Prev by Date: Re: [ANN] Report on AS 1.5.5 from AppleScript Sourcebook
  • Next by Date: Re: I want to compare two AppleWorks files
  • Previous by thread: Re: Count of Tab characters
  • Next by thread: Re: Count of Tab characters
  • Index(es):
    • Date
    • Thread