>Dear terry,
>Thanks for your help, but still I am Having trouble with the code in this line...
>
>lcFileToOpen = "C:\Reports\Datereport.doc"
>.oWord = CREATEOBJECT( "Word.application") <--- error occurs in this line(with/endwith)
>.oWord.Open( lcFileToOpen)
>.oWord.Visible = .T.
>
>what should i substitute "word.application" with?
>Or do i need to add a class library?
>Remember, the document is already created... I just want to open the .doc file using a command button on my form. It should open Microsoft word and show Datereport.doc...
>
>HUCHM
>
>Att. Juan
Juan,
Try it without the . before oWord.
Regards,
Jim