>>=YSelectOnePage(4) && paste text from page 4 into the text file c:\hi.txt >> >>Procedure YSelectOnePage >>lParameter pnPage >>oWord = Getobject(,"Word.Application") >>lnPageCount=oWord.ActiveDocument.ComputeStatistics(2) >>with oWord.Selection >> if lnPageCount<pnPage >> * error message go here >> else >> .GoTo(,,,pnPage) >> lnStart=.Range.Start >> if lnPageCount >pnPage >> .GoToNext(1) >> lnEnd=.Range.Start - 1 >> else >> .Endkey(6) >> lnEnd=.Range.Start >> endif >> oWord.Activedocument.Range(lnStart,lnEnd).Select >> > =strtofile(_cliptext,"c:\hi.txt") >> > endif >>endwith >> >>oWord=.NULL. >>release oWord >>>>