>What am I doing wrong here?
>
> oWord = CREATEOBJECT("Word.Application")
> oWord.Documents.Open("FileName:='c:\test.doc'")
As Edward said, the problem is that VFP does not support named parameters, only positional parameters. In other words, if you want to specify only two parameters to a function, and they're the second and fifth parameters listed in the Help file, you have to do something like
oApp.MyFunction(, "value 1", , , "value 2")
instead of
oApp.myFunction(parm2 := "value 1", parm5 := "value 2")