MS-activeX automation from Java
1 posts in topic
Flat View  Flat View

Posted By:   Anders_Both
Posted On:   Friday, December 7, 2001 10:00 AM

Is it posible to make connection to Mirosoft ActiveX or Com-objects, from Java.

In Visual Basic you would do somethink like:

Create a MPCoder object.

Dim Coder As MPCoder

Set Coder = New MPCoder

Load a predefined configuration.

Coder.Load ("C:file_name.xml")

How to go when using Java ??

Re: MS-activeX automation from Java

Posted By:   Adrian_Goldberg  
Posted On:   Monday, December 10, 2001 08:33 PM

see the Jacob project

Ive used this bridge to call Word and Excel from Java code.

eg -

import com.jacob.com.*;
import com.jacob.activeX.*;

ActiveXComponent wo = new ActiveXComponent("Word.Application");

Object wrdo = wo.getObject();

try {

Dispatch.put(wrdo, "Visible", new Variant(true));

Object documents = wo.getProperty("Documents").toDispatch();

Object docs = Dispatch.call(documents, "Open", filetoopen).toDispatch();


About | Sitemap | Contact