Sergej,
WordBasic is a whole different thing than VBA. Are you using Word95, Word97 or Word2k?
The error is telling you that WholeStory is not a valid method name of the ox.Selection object reference.
Look in the vbawrd8.hlp file to see some examples of how to use the WholeStory method. I'm not a Word automation expert, I remember trying to use the WholeStory at one point, but changed to another technique, so I don't have an example to give you.
>David.
>I need your help!
>
>In command button of form is next code:
>
>#include msword.h && I download this file from your site(it help me create another task)
>ox.=createobject('word.document')
>ox.application.documents.open(thisform.text1.value) && open any existing winword document
>ox.Selection.WholeStory && I want select all text in opened file and copy to buffer
>ox.Selection.Copy
>
>On operator ox.Selection.WholeStory generated error:
>OLE error code 0x80020006 Unknown name
>In Winword Basic help WholeStory and SelectAll - is a WordBasic methods
>
>I don't understand how I can select all text in opened winword file?