>Thank you for your prompt response. The last line of code is causing the error:
>
>
>LOCAL vCommander
>LOCAL ParamStr
>LOCAL sResult
>LOCAL iRet
>
>
>* Get the Commander Object. If GroupWise isn't up, this will bring it up
>vCommander = CREATEOBJECT("GroupWiseCommander")
>
>* Bring up the new mail dialog.
>ParamStr = "NewMail()"
>
>* this line gives the error
>iRet = vCommander.Execute(ParamStr, sResult)
When you declare variable Local foxpro assigns .f. as value. I guess sResult has to be a string and something will be returned in it. Try following
sResult = REPLICATE( CHR(0), 255)
iRet = vCommander.Execute(ParamStr, @sResult)
--sb--