Sorry about that, I clipped some code from a prg and didn't clip the endif in the previous posting.
Try this with the endif removed!
* remove the public references after you test. They are there so you can
* reference from the command window
public lcword,oword
oword=create('word.application')
wrdfile='d:\myfile.doc'
oword.documents.open(wrdfile)
oword.caption='Word97 Example'
oword.Application.Selection.WholeStory
lcword=oword.application.Selection.Text
*toggle visible to .f. to not see, .t. to view
oword.visible=.f.
? lcword
oword.quit
John Harvey
Shelbynet.com
"I'm addicted to placebos. I could quit, but it wouldn't matter." Stephen Wright