James White wrote:

> Hi All,
> 
> I have been trying to embed an OpenOffice 3.0.1 document in an SWT
> Frame using the org.eclipse.swt.ole.win32 packages. I consistently get
> the error "Failed to create Ole Client. result = -2147024770" when
> trying either of the following:
> 
> controlSite = new OleControlSite(oleFrame, SWT.NONE,
>                                               "soffice.StarWriterDocument.6");
> 
> clientSite = new OleClientSite(oleFrame, SWT.None, new File("C:/test.odt"));
> 
> I have also tried to use the plugin from http://www.comeclipse.com/ to
> create a wrapper for so_activex.dll but there I get the following
> error: "Failed to create Ole Client. result = -2147467262"
> 
> So I'm wondering, is there a definitive way of embedding OpenOffice
> 3.0.1 in an swt.frame using activex / ole ?

I don't know that swt stuff, but it smells like OLE embedding. In
general you can embedd OOo documents into OLE containers. "In general"
means that different OLE containers have different implementation
qualities and different ways to handle the unclear parts of the OLE
protocol, so it's impossible to predict if a particular client works
with OOo, even if you know that it works with other particular client.

You should be able to insert OOo objects into e.g. Wordpad (you can try
it). But that doesn't mean that it works in all other OLE containers.
The OLE implementation of OOo follows the MS documentation very
strictly, but obviously that doesn't mean a lot.

Perhaps you can find something about the resulting error code in the
Internet, that could give a hint what's going wrong here.

Ciao,
Mathias

-- 
Mathias Bauer (mba) - Project Lead OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS
Please don't reply to "[email protected]".
I use it for the OOo lists and only rarely read other mails sent to it.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to