>Hi Tamar,
>
>>But I think Bret's point is that the association may not be right on the student machines. What happens if you double-click a DOC in Explorer on those machines? Does Word open? If not, there's your problem.
>
>Yes, the association on the student machines is set up correctly. Double clicking on the file wordperfectly, uh, I mean, works perfectly. < g >
>
>Any other ideas?
>
>Thanks!
I suspect GETOBJECT works subsequent to instanciation. Maybe the Word.Application needs to be up and running for GETOBJECT to return a hit?
oldOnError=on('error')
on Error oWord=.NULL.
oWord=getobject(,'Word.Application')
on error &oldOnError
if isnull(oWord)
oWord=createobject('Word.Application')
endif
oMyWord = GETOBJECT("C:\VFPTraining\letter.doc")
HTH
Imagination is more important than knowledge