Board index » delphi » Close MsWord 2000

Close MsWord 2000

Hi,
    with MsWord 97, the following code used to work:

WordHandle = FindWindow ('OpusApp', "");
SendMessage (WordHandle, WM_SYSCOMMAND, SC_CLOSE, 0);

But it doesn't work with MsWord 2000, anybody knows what they've called
MsWord 2000 instead of 'OpusApp' ???

Thanks..
--

Dan Gervais
Product Manager
MultiCorpora Inc
d...@multicorpora.ca
www.multicorpora.ca

Tel:  819-595-5884
Fax: 819-595-5859

 

Re:Close MsWord 2000


Quote
"Dan Gervais" <d...@multicorpora.ca> wrote:
>    with MsWord 97, the following code used to work:

>WordHandle = FindWindow ('OpusApp', "");
>SendMessage (WordHandle, WM_SYSCOMMAND, SC_CLOSE, 0);

>But it doesn't work with MsWord 2000, anybody knows what they've called
>MsWord 2000 instead of 'OpusApp' ???

I don't have Word2000, but don't you have WinSight?

Regards,
Chris Roberts

Re:Close MsWord 2000


No I don't.

What can it do for me??

Can it tell me OpusApp equivalent for MsWord 2000???

--

Dan Gervais
Product Manager
MultiCorpora Inc
d...@multicorpora.ca
www.multicorpora.ca

Tel:  819-595-5884
Fax: 819-595-5859

Quote
Chris Roberts <croberts_nils...@picknowl.com.au> wrote in message

news:37b19a31.30007989@forums.inprise.com...
Quote
> "Dan Gervais" <d...@multicorpora.ca> wrote:

> >    with MsWord 97, the following code used to work:

> >WordHandle = FindWindow ('OpusApp', "");
> >SendMessage (WordHandle, WM_SYSCOMMAND, SC_CLOSE, 0);

> >But it doesn't work with MsWord 2000, anybody knows what they've called
> >MsWord 2000 instead of 'OpusApp' ???

> I don't have Word2000, but don't you have WinSight?

> Regards,
> Chris Roberts

Re:Close MsWord 2000


Yes, it can.  BTW, it still is OpusApp.  You can install Winsight from your
Delphi CD.

Eric

Quote
Dan Gervais <d...@multicorpora.ca> wrote in message

news:7os9nt$cqa5@forums.borland.com...
Quote
> No I don't.

> What can it do for me??

> Can it tell me OpusApp equivalent for MsWord 2000???

> --

> Dan Gervais
> Product Manager
> MultiCorpora Inc
> d...@multicorpora.ca
> www.multicorpora.ca

> Tel:  819-595-5884
> Fax: 819-595-5859
> Chris Roberts <croberts_nils...@picknowl.com.au> wrote in message
> news:37b19a31.30007989@forums.inprise.com...
> > "Dan Gervais" <d...@multicorpora.ca> wrote:

> > >    with MsWord 97, the following code used to work:

> > >WordHandle = FindWindow ('OpusApp', "");
> > >SendMessage (WordHandle, WM_SYSCOMMAND, SC_CLOSE, 0);

> > >But it doesn't work with MsWord 2000, anybody knows what they've called
> > >MsWord 2000 instead of 'OpusApp' ???

> > I don't have Word2000, but don't you have WinSight?

> > Regards,
> > Chris Roberts

Re:Close MsWord 2000


You're right, it is still OpusApp!!
Thanks!

Then, I have another problem, I can identify that MsWord is running, with:

WordHandle = FindWindow ('OpusApp', "");
while (WordHandle != NULL)
....

 SendMessage (WordHandle, WM_SYSCOMMAND, SC_CLOSE, 0);

...

The sendmessage works fine with MsWord 97, but doesn't seem to work with
MsWord 2000????

Any ideas???

Thanks,
--

Dan Gervais
Product Manager
MultiCorpora Inc
d...@multicorpora.ca
www.multicorpora.ca

Tel:  819-595-5884
Fax: 819-595-5859

Quote
Eric Holton <hol...@ix.netcom.com> wrote in message

news:7osg3c$cq811@forums.borland.com...
Quote
> Yes, it can.  BTW, it still is OpusApp.  You can install Winsight from
your
> Delphi CD.

> Eric

> Dan Gervais <d...@multicorpora.ca> wrote in message
> news:7os9nt$cqa5@forums.borland.com...
> > No I don't.

> > What can it do for me??

> > Can it tell me OpusApp equivalent for MsWord 2000???

> > --

> > Dan Gervais
> > Product Manager
> > MultiCorpora Inc
> > d...@multicorpora.ca
> > www.multicorpora.ca

> > Tel:  819-595-5884
> > Fax: 819-595-5859
> > Chris Roberts <croberts_nils...@picknowl.com.au> wrote in message
> > news:37b19a31.30007989@forums.inprise.com...
> > > "Dan Gervais" <d...@multicorpora.ca> wrote:

> > > >    with MsWord 97, the following code used to work:

> > > >WordHandle = FindWindow ('OpusApp', "");
> > > >SendMessage (WordHandle, WM_SYSCOMMAND, SC_CLOSE, 0);

> > > >But it doesn't work with MsWord 2000, anybody knows what they've
called
> > > >MsWord 2000 instead of 'OpusApp' ???

> > > I don't have Word2000, but don't you have WinSight?

> > > Regards,
> > > Chris Roberts

Other Threads