OleControlSite: conntect to an existing instance [message #534716] |
Thu, 20 May 2010 06:14 |
Eclipse User |
|
|
|
Originally posted by: Ludger.Heisterkamp.technotrans.de
Hello,
I am automating MS Word with an OleControlSite, which works prettty well:
new OleControlSite(frame, SWT.NONE, "Word.Application");
This code always opens a new Word instance. Is it possible to connect
to an existing instance of Word, if there is one?
Kind regards,
Ludger Heisterkamp
|
|
|
Re: OleControlSite: conntect to an existing instance [message #534797 is a reply to message #534716] |
Thu, 20 May 2010 11:34 |
Vijay Raj Messages: 608 Registered: July 2009 |
Senior Member |
|
|
Quote: | Is it possible to connect
to an existing instance of Word, if there is one?
|
I dont think so...
but i think you can open the word document which you want in the oleclient...
---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
|
|
|
Antw: Re: OleControlSite: conntect to an existing instance [message #535877 is a reply to message #534797] |
Wed, 26 May 2010 07:22 |
Eclipse User |
|
|
|
Originally posted by: Ludger.Heisterkamp.technotrans.de
Yes, that is right. This is the way I'm working right now.
But Word sometimes has problems accessing the normal.dot
when multiple instances are running at the same time.
To avoid these problems it would be nice to have the
possibility to access an existing instance.
In VB it possible via the GetObject method:
Dim wdapp As Object
Set wdapp = GetObject(, "Word.Application")
But there seems to be no equivalent method in SWT...
Regards,
LH
>>> vijay<vijay.rajonline@gmail.com> schrieb am Donnerstag, 20. Mai 2010 um
13:34 in Nachricht <ht36o0$sbo$1@build.eclipse.org>:
> Quote:
>> Is it possible to connect
>> to an existing instance of Word, if there is one?
>
> I dont think so...
> but i think you can open the word document which you want in the
> oleclient...
|
|
|
Powered by
FUDForum. Page generated in 0.03679 seconds