how to launch MS Word application using java

HI:I'm developing a project using java, but we need to launch Microsoft Word into java based GUI(like Jpanel, or Frame, things like that), could anyone be so kind that give some hints on how to do it?thanks!
[243 byte] By [xiaoqiang6922] at [2007-9-30 6:49:08]
# 1

I would be pleasantly shocked to find out this is possible. Well, let me retract that. You might, just very, very maybe, be able to use a combination of Windows API and Word's API (either DDE or OLE or ActiveX) to interact with Word.This will involve using a lot of native methods, javah and pre-compiled DLL's written in C or C++.

But I think you will be completely stuck trying to get the UI to switch to a JPanel. Microsoft would have to have a version of Word independent of the UI (in effect, have designed Word to have a pluggable user interface). They may have done this, but I have never heard of a project where someone successfully swapped out Word's user interface with a custom Swing one.

- Saish

"My karma ran over your dogma." - Anon

Saish at 2007-7-1 22:03:32 > top of Java-index,Administration Tools,Sun Connection...
# 2

I think you're better off having your java app simply launch Microsoft Word as a Windows app, instead of having to redesign Word as a java app. Java can launch external applications using the Runtime.exec() method, but if you're going to do it this way then you should read this article on using Runtime.exec() first:

http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html

hungyee98 at 2007-7-1 22:03:32 > top of Java-index,Administration Tools,Sun Connection...