Hi Sergej,
This will work to send the entire document text to a memory variable. Now this is Word2000 code but I think it also works in Word97 this way.
=oWord.ActiveDocument.Select
cText=oWord.Selection.Text
cText=LEFT(cText,LEN(cText)-1) && Required
You could then put it into the clipboard in VFP with:
_CLIPTEXT = cText
>Please answer to question.
>I am using Visual FoxPro 5.0 and Word 97.
>Foxpro program activate Word and then open the document.
>Hereinafter Foxpro program must send to Word-server command to select all the text of opened document and copy selected text into clipboard.
>I understand that WHOLESTORY, SELECTALL - is a methods.
>I don’t know how correctly calling this methods.
>Code of my FoxPro program:
>ox=createobject('word.document')
>ox.application.documents.open(Alltrim(Thisform.text1.value))
>ox.wholestory or ox.selectall !!! NOT WORKING
>
>In wordbasic help is any example how can use this methods. But I don’t understand how can calling such methods from foxpro program.
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05