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!

Similar Messages

  • Can an ipad read microsoft word documents

    Can an iPad read Microsoft Word documents?

    You only need those apps if you wish to create/edit Word documents.

  • CAN'T OPEN MICROSOFT WORD DOCUMENTS AFTER DOWNLOADING MAVERICK

    I downloaded Maverick OS X 10.9.3 and now I can't open my Microsoft Word documents!  HELP!!
    The message I receive when trying to open a document read:  You can't open the application "Microsoft Word" because PowerPC applications are no longer supported.
    I wish I knew this before I upgraded to Maverick.  It happened to my iphotos as well but after purchasing new software for iphoto, I have been able to retrieve my photos. 
    I hope I don't have to do the same for my documents.
    Thanks

    I wouldn't recommend buying the boxed version of Office 2011. A new version of Office is coming out in a few months and you'll be stuck with old software. The next version of Office will be subscription only. You can buy Office 365 now and it will automatically upgrade you for free when the new version comes out. This is a monthly fee.
    If paying monthly is not an option for you, you can also look at buying Office 2008. While it's End of Life software like Office 2004 (this means it will receive no further updates) it will run in Mavericks with only a few minor glitches. You might be able to buy Office 2008 at a more reasonable price. Otherwise I would like at LibreOffice or OpenOffice that Esquared mentioned above.

  • How can Tiger open Microsoft Word documents sent by e-mail?

    I recently upgraded to Tiger and use Appleworks 6, which is unable to read the Microsoft Word documents I frequently receive by e-mail. Is there any way I could read such documents, or should I get Microsoft Word? If so, which number/level would you advise? (I'm happy with Appleworks.)

    Do the problematic Word attachments end in ".doc" or in ".docx"?
    Neither AppleWorks 6 nor TextEdit will handle Microsoft's marketing-driven "improved" file format used in Mac Office 2008 / Windows Office 2007 (which is almost-but-not-really based on XML). There's a backwards-compatible option in those versions of Word to "Save As" Word 97 -2004 format (.doc). The practical solution where I work is to track down anyone sending .docx and threaten them with grievous bodily harm unless they resend as .doc and swear to never use .docx again.
    Microsoft has a converter that (allegedly) converts the new format to the vastly more common one, but that requires a previous copy of Office (Office 2004 or Office X).
    You can try the Mac OS X Dashboard widget DocX Converter instead.

  • API FOR READING MICROSOFT WORD DOCUMENT FILE

    HELLO
    I need to know are there any api's to read a word document i.e a .doc file into a java program. If there r api where can i find them & how can i use them

    For Reading PDF documents, you can use PDFBox, for reading word documents, Apache's POI . But POI supports only Excel right now, Word will soon be supported

  • Can i place microsoft word documents on icloud

    I have just upgraded and would like to place many saved microsoft word documents (on imac) loaded to icloud.

    You need Pages (App Store), MS Word can not save to iCloud. You'll need Pages for the Mac and Pages for any IOS device you use (iPhone etc)

  • Any free ipad app,so that I can open my Microsoft Word documents

    Any free ipad app,so that I can open my Microsoft Word documents

    Another one that just opened up yesterday is OnLive. Both OnLive and CloudOn are cloud-based - you're accessing a server to operate Windows programs and files remotely. There are drawback to it, compared to a full program on the iPad (storing your files remotely, requiring strong and constant internet connection), but since they are both free for now (OnLive will offer pay plans for more storage and features, I imagine CloudOn will do something similar) it can't hurt to try them. I'm downloading both and will give them a whirl.
    I'm also hoping the rumors that MS is working on iPad versions of Office is true, although I imagine that just like the iWorks programs they'll have less features than the full versions.

  • Reading Microsoft Word Document in JAVA

    Hi friends,
    im using follwing code to read word document in java using apache poi package..
    import org.apache.poi.poifs.filesystem.*;
    import org.apache.poi.hwpf.*;
    import org.apache.poi.hwpf.extractor.*;
    import java.io.*;
    public class readDoc
    public static void main( String[] args )
    String filesname = "Hello.doc";
    POIFSFileSystem fs = null;
    try
    fs = new POIFSFileSystem(new FileInputStream(filesname;
    //Couldn't close the braces at the end as my site did not allow it to close
    HWPFDocument doc = new HWPFDocument(fs);
    WordExtractor we = new WordExtractor(doc);
    String[] paragraphs = we.getParagraphText();
    System.out.println( "Word Document has " + paragraphs.length + " paragraphs" );
    for( int i=0; i<paragraphs .length; i++ ) {
    paragraphs[i] = paragraphs.replaceAll("\\cM?\r?\n","");
    System.out.println( "Length:"+paragraphs[ i ].length());
    catch(Exception e) {
    e.printStackTrace();
    but im getting exception that
    java.io.IOException: Unable to read entire header; -1 bytes read; expected 512 bytes
    at org.apache.poi.poifs.storage.HeaderBlockReader.<in it>(HeaderBlockReader.java:78)
    at org.apache.poi.poifs.filesystem.POIFSFileSystem.<i nit>(POIFSFileSystem.java:83)
    how to solve this issue.. please suggest me .. its urgent..
    Add to satheeshtech's Reputation

    You might do better consulting [http://www.nabble.com/Apache-POI-f298.html|http://www.nabble.com/Apache-POI-f298.html] .

  • Can't open Microsoft Word document through SharePoint

    Since upgrading to Firefox 35, I am no longer able to open Microsoft Word files through SharePoint. When I select "Edit in Microsoft Word," I get the error message "No connectivity with the server. [FILENAME] can't be opened because the server couldn't be contacted."
    Note that this is specific to my Mac. I can open Word files on SharePoint when I use my VMWare Windows simulator.
    Any suggestions for a fix?

    see if any of these can help.
    http://kb.mozillazine.org/Unable_to_save_or_download_files
    http://www.ehow.com/how_11385212_troubleshoot-reset-connection-firefox.html
    https://support.mozilla.org/en-US/kb/server-not-found-connection-problem
    https://support.mozilla.org/en-US/kb/firefox-cant-load-websites-other-browsers-can
    https://support.mozilla.org/en-US/kb/secure-connection-failed-error-message
    https://support.mozilla.org/en-US/kb/connection-untrusted-error-message
    '''http://kb.mozillazine.org/Error_loading_websites'''
    '''This Connection is Untrusted''' is sometimes caused because the
    computer system clock is wrong. Check the time / date / time zone settings.

  • Can i open microsoft word documents in pages?

    I need a word processor for college and if i can use pages instead of word then i can save a whole lot of money.

    Hi Rich,
    If your instructors want you to turn in assignments in Word format, then I'd advise you to get Word. If your work will be Printed or used in PDF format, Pages will do nicely. It's not that you can't export to Word from Pages, it's that you don't need the hassles of semi-accurate conversions.
    If money is a big concern, you can install one of the free clones of Office. LibreOffice is generally well regarded for this purpose.
    Jerry

  • Viewing Microsoft Word Documents on iPod

    I tried to put some Microsoft word documents on my iPod but when I selected them from my iPod only a jumbled word would show up. Does anyone know how I can succesfully put Microsoft Word Documents on my iPod?

    What do you mean "plain text"? Is that a font or something?

  • When I download Microsoft word documents (if have word 2007), I have somehow changed the settings and it downloads them in wordpad, and the format is very bad and I can't read a lot of the document. How do I change the default setting back to using Micro

    When I download Microsoft word documents (if have word 2007), I have somehow changed the settings and it downloads them in wordpad, and the format is very bad and I can't read a lot of the document. How do I change the default setting back to using Microsoft Word 2007 to open these documents?
    == This happened ==
    Every time Firefox opened
    == about a few weeks ago - I had tried to open some docuuments saved on a mac, my PC (which runs Windows 7), used word pad to open these, and this seems to have changed the default settings somehow.

    See this:
    [http://support.mozilla.com/en-US/kb/Managing+file+types]

  • How can I change a Microsoft Word document file into a picture file?

    How can I change a Microsoft Word document file into a picture or jpeg file? I am wanting to make the image I created my background on my macbook pro.

    After I had the document image the way I wanted it, I saved it as a web page and went from there. Below are the steps starting after I did the "save as" option in Word:
    1) Select "Save As Web Page". I changed the location from documents to pictures when the window came up to save it as a web page.
    2) Go to "Finder" on you main screen, or if it's on your main toolbar at the bottom.
    3) Click on the "Pictures" tab and find the file you just re-saved as a web page. (I included "web page" or something similar in the new title so I could easily find the correct file I was looking for)
    4) Open the correct file and then "right click" on the actual image. (Use 2 fingers to do so on a Mac)
    5) Select 'Use Image As Desktop Picture", and voilà! The personally created image, or whatever it is that you wanted, is now your background.
    **One problem I encountered while doing this is that the image would show up like it was right-aligned in relation to the whole screen. The only way I could figure how to fix this was to go back to the very original document in Word, (the one before it was saved as a web page), and move everything over to the left.
    I hope this helps someone else who was as frustrated as I was with something that I thought would have been very simple to do! If you have any tips or suggestions of your own, please feel free to share. : )

  • HT2506 hi i can't seem to copy and paste pdf files from preview to a microsoft word document. it always comes up with nonsense characters in the word document. how do i fix this? thanks in advance

    hi i can't seem to copy and paste pdf files from preview to a microsoft word document. it always comes up with nonsense characters in the word document. how do i fix this? thanks in advance

    Hi,
    The quickest way to do this (tested with OS 10.8.2, MS Word 2011) is in one line:
    tell application "Microsoft Word" to close every document whose name begins with "book"
    The reason why your script doesn't work is that you aren't specifying to Word which document you want it to close.
    So, changing one line ought to do it:
    close document incrementvalue -- instead of "close document"
    But... when you close a document, you change the document count. Document 2 becomes document 1, document 3 becomes document 2 etc. So eventually you'd get a message saying "The object you are trying to access doesn't exist".
    Because of this, if you want to do it in a repeat loop, you have to work backwards:
    tell application "Microsoft Word"
      set doc_count to count documents
      repeat with x from doc_count to 1 by -1
      if name of document x begins with "book" then close document x
      end repeat
    end tell
    Hope this helps.

  • HELP!!!! I have spent hours trying to find out how to embed an image with a link or a Microsoft Word document with a hyperlink built within the document -- not as an attachment! Does ANYONE know the secret? Can it be done, or not! My PC clients do it.

    HELP!!!! I have spent hours trying to find out how to embed an image with a link, or embed a Microsoft Word document with a hyperlink built within the document -- not as an attachment into my email -- but where it shows as the email content when opened! Does ANYONE know the secret? Can it be done, or not? My PC clients do it all the time easily. Then I want to be able to send the embedded image/document (not as an attachment, but visable within the email when opened) to many email contacts at once, BUT the individuals receiveing them DO NOT SEE the other email contacts. Cannot seem to be able to find anything on being able to do these 2 tasks.PLEASE, SOMEONE, HELP!!!

    Don't know if this applies to Lion, but read here:
    http://www.makeuseof.com/tag/create-html-announcement-mail-iweb-mac/

Maybe you are looking for