I develop application in vfp9 using the command CREATE OBJECT for link ole
application and work fine with EXCEL, WORD and PP, but i cant do the same to
link with WORDPAD or NOTEPAD, i will appreciate if could help to to fix these
problem.
Thanks.

Re: CREATE OBJECT by Fred

Fred
Wed Aug 17 00:27:17 CDT 2005

WORDPAD and NOTEPAD are not automation servers so that cannot be done for
them.


--
Fred
Microsoft Visual FoxPro MVP


"Armando villa" <Armandovilla@discussions.microsoft.com> wrote in message
news:029A4F01-3F2A-43DC-8BB9-9C6136E56B25@microsoft.com...
>I develop application in vfp9 using the command CREATE OBJECT for link ole
> application and work fine with EXCEL, WORD and PP, but i cant do the same
> to
> link with WORDPAD or NOTEPAD, i will appreciate if could help to to fix
> these
> problem.
> Thanks.



Re: CREATE OBJECT by Zeke

Zeke
Wed Aug 17 02:48:24 CDT 2005

"Armando villa" <Armandovilla@discussions.microsoft.com> wrote in message
news:029A4F01-3F2A-43DC-8BB9-9C6136E56B25@microsoft.com...
>I develop application in vfp9 using the command CREATE OBJECT for link ole
> application and work fine with EXCEL, WORD and PP, but i cant do the same
> to
> link with WORDPAD or NOTEPAD, i will appreciate if could help to to fix
> these
> problem.
> Thanks.

Try using the Foundation Class Shell Execute or use a shellexec function
like the following:

*!* Function ShellExec
Lparameter lcLink, lcAction, lcParms
lcAction = Iif(Empty(lcAction), "Open", lcAction)
lcParms = Iif(Empty(lcParms), "", lcParms)
Declare Integer ShellExecute ;
In SHELL32.Dll ;
Integer nWinHandle, ;
String cOperation, ;
String cFileName, ;
String cParameters, ;
String cDirectory, ;
Integer nShowWindow
Declare Integer FindWindow ;
In WIN32API ;
String cNull,String cWinName
Return ShellExecute(FindWindow(0, _Screen.Caption), ;
lcAction, lcLink, ;
lcParms, Sys(2023), 1)





Re: CREATE OBJECT by Olaf

Olaf
Wed Aug 17 02:47:06 CDT 2005

Hi Amando,

you can only use ShellExecute to call notepad/wordpad and feed
them a txt/doc file as a parameter. But as Fred said they are no
COM/OLE automation servers, so you can't have control over
them after they started as an independant process.

Go to groups.google.com and follow the link for advanced search,
then search for ShellExecute in newsgroups *fox* and you'll find
descriptions on how to use ShellExecute.

Bye, Olaf