CreateProcess question

CreateProcess question

Post by Jannie Ne » Tue, 06 Oct 1998 04:00:00



Hi,

I'm using CreateProcess to fire MS Word with a document name as parameter.
MS Word opens with the specified document. So far so good. If I now want to
open another document without running a second MS Word session, how do I do
it ? Is there some special parameter that I should send MS Word ?

Thanks in advance.

 
 
 

CreateProcess question

Post by Guy Gajewsk » Tue, 06 Oct 1998 04:00:00



>I'm using CreateProcess to fire MS Word with a document name as parameter.
>MS Word opens with the specified document. So far so good. If I now want to
>open another document without running a second MS Word session, how do I do
>it ? Is there some special parameter that I should send MS Word ?

    I'm not 100% sure, but I believe the only way to get that level of
comtrol is to use the MS Word COM Interfaces.

-------
You can find me on #Delphi on Newnet (irc.newnet.net)

 
 
 

CreateProcess question

Post by Robert Cern » Tue, 06 Oct 1998 04:00:00




Quote:> Hi,

> I'm using CreateProcess to fire MS Word with a document name as
parameter.
> MS Word opens with the specified document. So far so good. If I now want
to
> open another document without running a second MS Word session, how do I
do
> it ? Is there some special parameter that I should send MS Word ?

> Thanks in advance.

Use ShellExecute function.
ShellExecute(Handle,'open',Filename,'','',SW_SHOW);
It runs word (more precisely the associated application), if it is not
running otherwise tells it to just open file (if associated application
support it, word does by default).

--
-------------------------
Regards,
Robert

Remove both qwe when replying.