Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Failed to create Ole Client.
Failed to create Ole Client. [message #645270] Thu, 16 December 2010 10:53 Go to next message
Sunny is currently offline SunnyFriend
Messages: 6
Registered: May 2010
Junior Member
Hi,

I would like to post a question with no answer and I hope of help.

I have an RCP application. I can open microsoft office documents inside, f.e. with the docx extension. But if I modify the document and save it, the save operation corrupts the document somehow. Next time I try to open it from the RCP application, I got an OLE exception "cannot create the in place editor".

org.eclipse.swt.SWTException: Failed to create Ole Client. result = -2147467260


If I try to open the document directly with microsoft office, the error is "the file is corrupted and cannot be opened". If I chose to restore the file, the file is restored correctly.

I have eclipse 3.5 and Java 6


Any help is greatly appreciated.


Thanks.
Re: Failed to create Ole Client. [message #650651 is a reply to message #645270] Tue, 25 January 2011 20:43 Go to previous messageGo to next message
Philipp M. Fischer is currently offline Philipp M. FischerFriend
Messages: 67
Registered: November 2010
Location: Germany
Member
Hi,

Can you be a bit more precise on how you open the document. And how you trigger the save operation?

Cheers

Phil
Re: Failed to create Ole Client. [message #650706 is a reply to message #650651] Wed, 26 January 2011 08:46 Go to previous messageGo to next message
Sunny is currently offline SunnyFriend
Messages: 6
Registered: May 2010
Junior Member
Hi,

thnak you for the replay.

I open the Document with:

OleClientSite site = new OleClientSite(frame, SWT.NONE, "Word.Document",f);

and save with :

site.save(f, true);

Regards.
Re: Failed to create Ole Client. [message #650759 is a reply to message #650706] Wed, 26 January 2011 12:42 Go to previous message
Philipp M. Fischer is currently offline Philipp M. FischerFriend
Messages: 67
Registered: November 2010
Location: Germany
Member
Hi Sunny,

This is pretty much what I am doing as well. Anyway, did you have a look to the Eclipse Corner Article on ActiveX and SWT. Maybe that is giving you another hint.

Looking to the message org.eclipse.swt.SWTException: Failed to create Ole Client. result = -2147467260, makes me believe there is another half connected Wordd Instance running in the background. Have a look with the Task Manager and kill the Word processes, that are not shut down correctly.

I hope that helps a bit.

Cheers

Phil
Previous Topic:OleClientSite Trouble with Excel
Next Topic:Cloning a GC
Goto Forum:
  


Current Time: Sun Mar 29 16:24:25 GMT 2020

Powered by FUDForum. Page generated in 0.01564 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top