Embedding Microsoft Word in Java

Hi,
i want to embed Microsoft word in my java application. Can anyone one tell me how to embed word in java. By embedding, I don't mean to invoke word from java. I want to use word as an editor in java.
Thanks,
Ashu

COM-JAVA bi-directional bridge can be used to transfer calls between Java-COM-Java. Almost all the MS products come as COM Components which by COM specifications can be reused or upgraded with out any need for recompilation.
By using bi-directionaly bridge we can make such a way that Word is extended from Canvas and add to any java component. All the connection points (In COM Tech, Connection points are used for event firing) can be converted as events and methods calls can be directed thru bridge.
I checked out JIntegra. Its good and working fine. They give u a limited time evaluation version and after that you have to pay. Check out JIntegra at linar.com
Check this thread for a sample code. It shows how I can use IE in panel.
http://forum.java.sun.com/thread.jsp?forum=57&thread=143800
Good luck,
Mohan

Similar Messages

  • Interaction with Microsoft Word using Java Programming

    writing Text ON TO MICROSOFT WORD USING java Programming Urgently required

    Go throuh jakarta POI(hssf) to do..No! HSSF which stands for Horrible SpreadSheet Format can be used for Excel (spreadsheets as the name suggests). For Word, you would need to lok at HPSF.

  • Invoking Microsoft Word from Java code

    I want to invoke Microsoft word from Java code. How can i do this plz ............... Help

    do something along these lines.... here is an example with notepad
    create a .bat file with the commmand in to run notepad for example
    notpad c:\test.txtthis command calls notepad and passes it the argument C:\test.txt which is the file and it's location, that I want to open.
    The Java program
    import java.util.*;
    import java.io.*;
    public class Run
    public static void main(String args[])
        try
           //the name of the batch file with your commands in
           String command ="runprog.bat";
           //get the runtime 
           Runtime rt  = Runtime.getRuntime();
           //run the bat file  
           Process proc = rt.exec(command);
          //wait for the program to exit i.e notepad then get the return code
          int exitVal = proc.waitFor();
          //print out the exit value
          System.out.println(2THe Process exit value is: " + exitVal);
      catch(Throwable t)
         t.printStackTrace();
    }have a look at this
    http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Runtime.html
    and this
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps_p.html

  • Calling Microsoft Word in Java

    I am new to Java. I would like to know is there any way that I can invoke Word or Excel application in my Java program? If yes, how? Thank you in advance for your help.

    Use Runtime.getRuntime().exec("..."), where the string could be word.exe etc.

  • Microsoft Word to Java

    Yes I checked Google, yes I checked these forums and so on. Basically, what I'm trying to do is read in a word file, check for certain words (its a code that users will write in the word document) and then check those codes to see if they match a code in a text file (most likely another word document) and then append to that code the description that follows the matching code from the database to the existing word document.
    I found the POI project, which seems to be feasible, but I was just wondering if you guys are aware of this (because I need to give an answer to work to see if it's possible soon) and if it is possible, how long is it going to take me to do it.
    So what I'm looking for essentially is :
    -Read Word file
    -search through it for specific words
    -run those words through the database to find the corresponding one
    -append the description from the database to the code inside the word file
    -the database is most likely another word file.
    So do you think it would work with POI? J-Integra costs money so that is a no dice.
    And it isn't a one time thing, people will be using it later on.
    I'm thinking executable jar, but I can take care of that.
    Comments/experience/suggestions are welcome, thanks.

    Actually I need something that can be distributed to
    alot of computers, and right now for POI to work I
    need ANT and forrest. Things that I am not too
    familiar with and don't have time to either. This has
    to be user friendly and editable.
    I wrote a Macro that saved the doc file into xml to a
    specific location with a specific name. I'm going to
    have an executable jar and the user just has to click
    it and enter the keyword they are looking for. ( I
    made an applet due to userfriendly-ness). Afterwards,
    I'm going to make it convert back to doc (I'm still
    working on that, probably another macro.). All in
    all, this is my solution since the exporting to xml
    is clean (the interface, not the code).
    And since converting back to doc from xml is almost
    flawless (with the type of documents I'm using) it
    works perfectly for MY needs.
    Anyways, that's all I did. POI looks like a hassle
    and a half to go through.Well, it all depends on the circumstances. I've seen this kind of thing come up before, where a circuitous route is taken to convert from one format to the other. If you know it's not going to change in the future, and you can conrol the environment, it may make sense.
    The danger is that if there's a lot of users, you now have to support the code itself, the macro, hope that there aren't MS Word version issues, JVM issues with MS vs. Sun, JVM version issues, etc. Personally, I'd either use WebStart or a web app so you can control the environment, and then I'd wire in POI. It's more development up front, but can potentially save you a lot of headache down the road.
    But as I said, your mileage may vary, consult a doctor if itching persists, etc. Good luck!

  • Access microsoft word doc using java

    how can i access microsoft word using java .
    I want to select text from the word in the same format as it is.
    if possible can u all help me

    By using an appropriate library. JText, whatever.
    Google, man.I think Rene meant iText!Whatever. :) Never used it, I just remembered there was something named like that. Thanks.

  • In mac OS, embedding ms word inside a SWT frame.

    i wan't to embed microsoft word inside SWT or java frame in macintosh OS.
    In windows OS, i embedded ms word inside a frame using org.eclipse.SWT.ole.win32 package.
    But in macintosh OS, i want to know the swt class or alternative GUI toolkit to embed microsoft word inside a frame.
    Also, handling with COM objects like (ms word, excel,paint objects, etc.,) in Macintosh OS.
    It will be helpfull to me if someone suggest the solution.

    Hi manju nath i m also searching the same code me too find the code for windows that support system 32 ole but mac does not support if u know the soln in mac os
    embed microsoft word inside java frame in macintosh OS.if u know the soln please tell me its should be very use full to me advance thanks .......

  • MICROSOFT WORD OR MICROSOFT EXCEL 를 REPORT VEIWER로 설정하는 방법

    제품 : AOL
    작성날짜 : 2005-04-26
    MICROSOFT WORD OR MICROSOFT EXCEL 를 REPORT VEIWER로 설정하는 방법
    ==========================================================
    PURPOSE
    MICROSOFT WORD OR MICROSOFT EXCEL 를 REPORT VEIWER로 설정하고자 할때
    참고하는 문서
    Explanation
    아래와 같은 절차에 따라 IE에서 Embeded 형태로
    MICROSOFT WORD R MICROSOFT EXCEL 를 볼수 있습니다.
    1.Viewer type을 추가합니다, Word 와 Excel Type 두개 모두 해야합니다.
    2.Sysadmin responsibility권한으로 Login
    3.Navigate as follows:
    Install -> Viewer Options
    4.다음 two lines 을 추가하고 저장한다.
    File Format Mime Type Description
    Text text/11i excel 11i excel
         Text     text/11i word     11i word
    5.다음을 실행합니다.
    5.1. Navigate to Profile --> System
    5.2. Search for %viewer%
    5.3. Click on the "Viewer:Application for Text". You should get the "…"
    5.4. Select either the 11i Excel or 11i Word option.
    (In this example choose 11i Word.)
    5.5. Save the configuration.
    5.6. Log out and log in again
    5.7. Login as sysadmin responsibility
    5.8. Go to "File" at the top and choose "Log on as a different user"
    If you don't have any reports that you can view then run a simple
    report like active users.
    5.9. Navigate to Requests --> View
    5.10. Choose View All My Requests
    5.11. Find the Active user report or any other report you wish to use.
    5.12. The Netscape Browser should come up and you will get a dialogue
    window that says the following:
    File Download
    "You have chosen to download a file from this location.
    What would you like to do with this file?"
    5.13. You have two choices. Open the file or save the file to disk.
    5.14. You also have a check box that if you uncheck it you will no
    longer get this window.
    5.15. Select Open this file from it's current location.
    5.16. You will now see the following window:
    "Open With
    Click the program you want to open the file 'file' with"
    5.17. In the top of the box put in a description you will be able to
    find later. In this case put in "11i word type".
    5.18. Go down on the list and find winword. Make sure that the Always
    use this program to open this file is checked and click OK.
    Reference Documents
    Note 119505.1

    I got this message when trying to use Excel 2003. I went to Microsoft's web site's community and entered the error message that you got. There was a solution offered that worked for me although I cannot remember now what it was. You might also try Microsoft's knowledge base for any possible answers for this problem. IMHO, I believe this is an Office 2003 problem and not an Acrobat problem.
    I usually find the answers to problems such as these on Microsoft's web site. Good luck.
    Ken Friedman

  • Importing Microsoft Word doc to InDesign with embedded EPS art ~ scaling issue

    Hi, my workflow calls for creating content in Microsoft Word 2010 with embedded EPS art, in this case MathType 6.7a math objects. When I import these manuscripts (after saving as Word 97/2003 format) into my Adobe InDesign CS5.5 templates, the embedded inline graphics have been resized. Strangely, InDesign is keeping the container frame at the correct dimensions and then upsizing or downsizing the art inside that box.
    When I export a sample graphic from the Word file and unembed the same graphic after import it into InDesign, the two graphics are different sizes. InDesign might increase the size of one embedded graphic by 400% and then scale it down to 25% inside the anchored picture box and then in the next anchored picture box it might decrease the size the art to 50% and scale it to 200%.
    I did a test and created a graphic in Adobe Illustrator, saved it as EPS, placed the graphic into a Microsoft Word 2010 document, saved it out to 97/2003 format, imported that doc into an empty Adobe InDesign CS5.5 file. Again! InDesign changed the size of the art and re-scaled it to appear the same.
    I've been able to duplicate this issue on InDesign CS4 also, on both Windows XP and Windows 7.
    Has anyone else run into this issue? Does anyone know why the InDesign import filter doesn't import inline art in a Word document at 100%? Thanks for the help!

    My solution for this is:
    1. Place *.docx (yes, docx) word document with mathtype equations into indesign. This will set correct baseline for equations which is very important.
    2. download this scalegraphics script http://in-tools.com/downloads/indesign/scripts/ScaleGraphics.zip
    3. copy script from zip folder to C:\Program Files\Adobe\Adobe InDesign CS4\Scripts\Scripts Panel\Samples\JavaScript
    4. open palet (window/autoamtion/scripts) scripts, find new sript and run it
    Voila, all equations is at 100%...
    Script explanation: http://in-tools.com/article/scripts-blog/scale-graphics-script/
    In links palete equations have eps extension but this is embeded wmf files so you cant open them in photoshop or distill it with distiller.-((( I use export to pdf option in indesign to make pdf file.
    If you want all this eps links to export from indesign use this method:
    1. in links palete select all links
    2. in palete menu choose "unembed link"
    3. on answer window choose "no"
    4. select folder where you want indesign save files
    5. press "select"
    6.  now you have all links in new folder unembed from indesign document and you can edit it with mathtype.

  • Searching a string in Microsoft word from a Jav Application

    Would appreciate if you could provide me with an example/ suggestion to search for a string in Microsoft Word document from a java aplication. Thanks

    Short and rude answer: STFW.
    Long and polite answer: If you use "java apache word excel" as the criterium to search the web with Google, the first hit is what we are looking for:
    http://jakarta.apache.org/poi/
    Good luck anyway!

  • How to check from code in Excel Addin that Excel is embedded in Microsoft word

    We've developed an Excel Addin in C# for Excel 2010 and it works perfectly OK. But one issue is reported very recently as below.
    1. Microsoft word document is created with an embedded excel work sheet.
    2. Save the document and close.
    3. Open the word document and try to edit the work sheet there.
    4. Following error comes.
    "The program used to create this object is Excel. That program is either not installed on your computer or it is not responding.
    To edit this object, install Excel or ensure that any dialog boxes in Excel are closed."
    5. This is because, our Addin is initialized and one excel process is running.
    6. If the Excel Addin is disabled, above work flow works correctly.
    Please let me know how to determine from the Excel Addin that the excel worksheet is embedded in another applicatoin. Because I want to disable the Addin in those cases and enable it if the Excel is opened standalone. The Addin is developed in C#.

    Hi,
    Since the error message, please try to install this Hotfix test if it works:
    http://support.microsoft.com/kb/2596494
    Note: Delete the Excel instance running in the background(Go to your task manager and delete it) before opening your Word document and edit your embedded Excel.
    If the issue still exists, please see the article and try the solution which I copied here:
    "The basic simple answer is to place a Marshal.ComReleaseObject(Wb) at the end (or better, in the Finally block) of your event handlers. This will properly allow Word and excel to handle the OLE communication by not having VSTO hang on to an instance
    handle of the workbook, therefore causing the error.
    And this is not carte blanche to start placing ComReleaseObject() all over your code. I have found VERY VERY few limited cases where using ComReleaseObject() in an add-in necessary. And this is one of them."
    http://davecra.com/2012/10/09/vsto-and-comole/
    Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.
    Regards,
    George Zhao
    TechNet Community Support

  • Printing a microsoft word doc using Java Print API

    Hi,
    I have to print a microsoft word doc.I am using Java Print API, but the code is printing only Hashcodes instead of the actual document.
    Here is the code. Please let me know whats wrong in it.
    CODE:::
    public String print() throws Exception {
    String realPath = getRealPath("/images/formLibrary/csaAddressContactRequestForm100.doc");
    PrintRequestAttributeSet pras1 = new HashPrintRequestAttributeSet();
    DocFlavor flavor1 = DocFlavor.INPUT_STREAM.AUTOSENSE;
    PrintService defaultService = PrintServiceLookup.lookupDefaultPrintService();
    DocPrintJob job = defaultService.createPrintJob();
    FileInputStream fis1 = new FileInputStream(realPath);
    DocAttributeSet das = new HashDocAttributeSet();
    Doc doc1 = new SimpleDoc(fis1, flavor1, das);
    job.print(doc1, pras1);
    Thread.sleep(10000);
    System.exit(0);
    return "";
    }

    By using an appropriate library. JText, whatever.
    Google, man.I think Rene meant iText!Whatever. :) Never used it, I just remembered there was something named like that. Thanks.

  • Connecting Java Application with Microsoft Word Toolbar

    My project involves designing a GUI with which I will use Java for. And I also have to create a Microsoft Word Toolbar that will open the Java GUI. There will be other interactions between both the GUI and the toolbar.
    Is that possible? Or shall I use Visual Basic or .NET for the GUI?
    Advice appreciated please!

    hi
    check this
    http://help.sap.com/javadocs/NW04/current/bi/docs/connectors/sapq_howto.html
    let me know am i reached ur  point
    bvr

  • Unable to open embedded Microsoft Excel 97-2003 worksheet in Microsoft Word 2013 docx document?

    Below is the steps to reproduce this issue.
    1. Open Microsoft Word 2013, create a blank Word document.
    2. Insert Ole object of type Microsoft Excel 97-2003 worksheet or Microsoft Word 97-2003 document.
    3. Save the document as Docx format and close the document. (Saving as Doc format works fine)
    4. Open the saved Docx format in Microsoft Word 2013, now try opening the Ole object.
    5. Error message is thrown as below image.

    Hi,
    This issue might be caused by the third-party software/add-in on your machine, interfering with the OLE process (the technical thing that lets you create/edit an object from an outside application inside Word).
    Based on my tested with my local environment (Office 2013 & Windows8.1), if I enabled some Excel Com add-ins with Microsoft Excel 97-2003 worksheet, I would get the same error when I embedded it to Microsoft Word 2013 DOCX file. Then, I go to Excel>file>options>add-ins.
    Then down the bottom select COM Add-ins from the drop down menu and hit go. Uncheck everything. After that, I could embedded the Microsoft Excel 97-2003 worksheet well.
    Please try the suggestion and hope it's helpful.
    Regards,
    George Zhao
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • Can JAVA read Microsoft word document?

    Hi
    I am trying to make a program that read a word document, and split the document in to each pages and save each pages with file as it's footer of each pages.
    --- example-----
    test.doc
    Page 1 |
    |
    |
    |
    |
    |
    footer - hi |
    Page 2 |
    |
    |
    |
    |
    |
    footer - test |
    Page 3 |
    |
    |
    |
    |
    |
    footer - still |
    Page 4 |
    |
    |
    |
    |
    |
    footer - hahaha |
    Page 5 |
    |
    |
    |
    |
    |
    footer - lastpage |
    -----------------------> Out put of the program
    hi.doc , test.doc, still.doc, hahaha.doc, lastpage.doc
    Is there any way to import word document and process like that above?
    I have searched about this, and found out 'Jakarta POI' can access to word document but with many restrictions. (I heard it doesn't support word version 2003 and 97)
    Can any one please answer this?
    Thankx

    I'm not really sure that java is the best language to use for this particular project. I haven't looked into writing a standalone application to do this sort of thing, but Microsoft Word has a built in VB editor that allows you to write scripts that will do this very simply, using Word's Document Object Model.
    I would imagine the same sort of the thing could be done from a Stand-alone aplication as well, but you might need some libraries for reading the document and obtaining the object with the same model. I would look into Microsoft's .net solutions for this one. You might even be able to work out a solution in C++, C#, or even J# (which I understand is "similar" to java), if you don't know visual basic.
    It is possible that there is a library out there that will read a Word Document, and create the appropriate Java object with the same object model, but I don't know where it can be found.
    Anyway, if the option is available to you, take a look at Microsoft's .Net. You'll probably have more luck that way. Good Luck!

Maybe you are looking for

  • All events are missing in iCal view

    iPhone can still sync with the events so they are still there, but I can't see them. If I add a new event, I can't edit it and then when I leave iCal and come back the event has also disappeared. Any thoughts?

  • Generate multiple Oracle Applications pdf reports in one batch

    hi, we are working in oracle applications 11i. we have a custom salary slip report that is built with Oracle Reports Builder and run as a PDF report in Oracle HRMS. I need to find a solution to generate the reports/pdf files of all employees in one r

  • Only boots into safe mode (What exactly is left out in safe mode?)

    my PBG4 hangs on a blank blue screen when i boot it, this happens on fresh (HD wiped) installs of both Tiger and Leopard. It boots fine from a dvd and while in safe mode. i want to try to track down what exactly is causing the hang, i guess it is a h

  • My email name in the "to" field disappears in Mac Mail

    In Mac Mail when I write my own email address in the "to" field, it disappears. And when I respond to an email, it comes into the recipient as "no sender sender." No one has been able to help me solve this. So I had to switch to Thunderbird (Mozilla)

  • System error while calling webservice adapter

    Hello Experts I am configuring a synchronous proxy to webservice scenario.I have created a webservice from a custom function module. while executing the interface i am getting the following error in the sxmb_moni. <SAP:Category>XIServer</SAP:Category