I want to merge two msword files

hi all,
I am in the problem of merging two word docuements as one .I have to do it in java b'ce our tool is developed only java.I am in pressure to give a solution for this ....
If any one know the solution for this........
Send it to me imme................................
Expecting ur replies.............
babu.B
[email protected]

Thanks for ur reply.but the code i was trying is giving me some problem as it is merging only one file while i am trying to do with two files.the code i have written i am just sending it.u just go thru it.
import java.io.*;
public class test1{
public static void main(String[] args) throws FileNotFoundException,IOException {
try {
FileInputStream fis = new FileInputStream("b.txt");
FileInputStream fis1 = new FileInputStream("a.doc");
FileOutputStream fos = new FileOutputStream("pq.doc",true);
int i;
while ((i=fis.read()) != -1) {
fos.write(i);
fis.close();
int j;
while ((j=fis1.read()) !=-1) {
fos.write(j);
fis1.close();
fos.close();
catch(Exception e){
e.printStackTrace();
Kindly let me know where the i missing or going wrong.
as i know word documets will contain some information like header and footer with some stuff its not merging.how to over come this situation.
plz help me out

Similar Messages

  • Having problem in merging 2 msword files

    hi all,
    Is it possible to merge two msword .doc file as a one single file thru java?
    pl ,I need the code if it is possible?
    Is it possible?
    Reply imme.................
    [email protected]

    Would be possible if you use a byte editor to see how a word file is put together. You would have to strip out information from file #2 and possibly modify bytes in file #1...so could be done but not easily.

  • Joining or merging two movie files

    If I want to join or merge two movie files (.m4v) into one, can I use one of the included applications on my iMac (iMovie, QuickTime, etc) or do I need a 3rd party app? If so, could you recommend one please?
    Thanks!

    On a related note-
    I have imported my "Das Boot" onto my drive, so I don't have to pull out my CD's. Food for thought before I go on any further - the files show up as ".dvdmedia". Since this version is the uncut 4 hr long version it is on two different CD's which converted into two files. How do I, if possible, make these into one file? I also have and am planning to import "Ben Hur". I tried to use iMovie (I have iLife 09') and it said I needed to "upgrade" to iMovie 3 (no luck with that one).
    Any legal suggestions?

  • Merge two PDF files into one with Adobe Reader

    Does anyone know how to merge two PDF files into one with Adobe Reader. Is it even possible?
    Thanks

    If you've got a Mac and OSX you can do this in Preview.  Make sure you can see the sidebar with the first PDF opened, and then drag the second PDF to the bottom of the last page in the sidebar.  Also you can reduce the size of your saved file by selecting (or making) a Quartz filter to 'reduce file size'
    Cheers

  • Merge two XML files From java

    hi,
    i'm in need to merge two XML files from my java code please help me as soon......

    Rajesh42 wrote:
    hi,
    i'm in need to merge two XML files from my java code please help me as soon......Hello Rajesh42,
    While it is wonderful that you have discovered the magically code tags, please consider if it is the right time to use them. Code tags should only go round code. Note used to make your posts "stand out", or used to quote other people. Just code.
    As to your question, what have you tried, what are you stuck on?
    Mike

  • Insert PDF into new Adobe Form - merging two PDF files into one

    Hi everyone,
    I need to enable access to archive PDF files but within a new PDF file containing header and footer.
    Request is not to change archived PDF files at all.
    I use Web Dynpro application to upload PDF file and to display new PDF file.
    I thought converting archive PDF files into JPG files and than using an 'Image Field' object to display those in a new PDF file.
    I am dealing here with PDF version 1.3 files.
    I am also having trouble converting these PDF files into JPG files. Any sugestions one this problem?
    Does anyone have any suggestion on how to deal with this concerning the fact that archive PDF files can not be changed?
    Is there some other way to merge two PDF files into one using Adobe Designer?
    Regards,
    Amel

    Hello, Lukasz:
      I am also facing similar requirement from my customer.
      And I found one useful blog, hope this blog can help you.
      http://wiki.sdn.sap.com/wiki/display/WDJava/CombinePDFfileswithWebDynproforJava
      Best regards, Nick.

  • I want to merge two mcp accounts.

    As I said I want to merge two different MCP accounts, so that I can get my MCSA certificate.
    Is it possible to do that. Because I have given 3 papers of MCSA and after that I have given 1 last paper of MCSA so that I can get my MCSA certificate. But accidently when I registered for the exam, my another new SR ID got created. And I have given exam
    on that new ID.
    So, now I am not able to get my MCSA certificate in my old MCP account.
    Please suggest something and Please HELP.

    Recently, I was reading forums looking for solution for the same problem, not much helpful then my prometric center person guided me to contact Microsoft at "mcphelp at microsoft . com" who helped to consolidate my two MCP ids
    in just two days, I delighted about the quick response. They also provided very detailed explaination why two ids got created and what causion you should take going forward. Here is part of the email response.
    A duplicate profile was created for you because a different email address was used when you took your last exam.
    When registering for exams in the future, please use the information (name, e-mail address, mailing address and phone number) as it appears on your current MCP profile. This would ensure that the exams get updated under your existing profile.
    Hopefully this information would be useful for others in similar need.

  • Batch merging two TIFF files into one

    I have a lot of portrait B5-size TIFF files that were scanned from paper documents and I plan to scan more.
    I want to merge every two of these files into landscape B4-size TIFF files.
    I want to do this by a batch job.
    What is the best way?
    Are there any command-line tools to do this job?
    I do not have Adobe package software. Instead I installed MacGimp.
    Although I have some experience with shellscript and Applescript,
    I'm new to Script-Fu.
    I made a GUI script for the application Preview that reads a multi-page TIFF file and saves as a PDF file with 2-UP layout. This method has two flaws:
    (1) Preview aborts for large files.
    (2) Resulting PDF file is more than five times as large as original TIFF file.
    Namely, 40-page, g4-compressed, 400KB TIFF file results in 2.5 MB PDF file.
    Maybe, the Preview does not make inheritance of TIFF compression.
    So I decided to make multi-page TIFF files of 2-UP layout.
    Thank you for reading.
    iMac G4   Mac OS X (10.3.9)  

    Self-solved.
    convert file1.tif file2.tif +append result.tif
    The command-line tool `convert' can be installed by Fink
    as a part of ImageMagick.
    iMac G4   Mac OS X (10.3.9)  

  • How to update bookmarks when merging two PDF files?

    We have a company catalog that gets generated once a night.  It's three step process:
         Step 1)  A raw XML file gets generated from our main ERP software (Microsoft Dynamics).
         Step 2)  Then that raw XML file is ran against a stylesheet with XEP to produce a nice professional looking catalog.
         Step 3)  And the third step is a script that merges the front and back covers with the main catalog produced in step 2.  Each cover is two pages (front and back).
    My problem is when step 3 runs it produces a final catalog but all the bookmarks are off by 2 pages because the front cover adds two pages in the very beginning.  This post may be premature because up until now I've been merging the PDF pages with a program called "GhostScript" and it allows me to merge them via line command.  I'm just now trying out AcroExch.App COM Object for VBScript so I'll see if it works but wanted to fire this out for help to see if anyone has encountered this or can confirm if Adobe automatically updates them for you?  When I "Merge" the PDF files through Acrobat Pro they get updated automatically, so hopefully it will work the same way with AcroExch.App Object.   Thanks guy!

    I think you might be misunderstanding what I'm saying... we are not performing tasks for non-licensed individuals.  We purchased a copy of Adobe Acrobat Standard so we could create a PDF of our catalog.  That catalog we then put on our website and let people download it.  Since our products change all the time, we generate a new catalog every night.  The term "server" is just a place where a script runs, I could have it run on my desktop computer if that's really an issue but I think we're talking semantics.  Acrobat is not what produces the main catalog PDF, that is done through XEP when it runs through the raw XML produced by our ERP software every night.  The only thing we want Acrobat to do is an automated process to merge 3 PDF files together:  Front Cover, Main Catalog and Back Cover.  That's it.   Are you saying that is against the EULA of Adobe for us to do that? 
    Now for the bookmark problem, what do you recommend I do then?  When I merge all three of those PDF files in Acrobat Standard manually it works perfect.  All I'm trying to do is automate that process once every night.  I know how to automate with Acrobat, I just can't figure out how to fix the bookmark problem?

  • How would I merge two csv files in Powershell

    Hello,
    I have two CSV Files.  Each has a list of virtual machines in them. One CSV file has the name of the VM as well as details about the RAM, CPU, VM Details (from VMM).  The other CSV File has the name of the VM as well as the IP address.
    How would I merge these two together?  For any VM's that do not exist in either file I wouldn't want to drop these VM names either. 
    Thanks.

    Thank you mjolinor for your suggestion.  This is not quite working for me.  What I'm seeing in the csv3.csv file all the  column details from the $firstCSV, and I'm seeing the headings included from the $secondCSV but all the details
    of the headings from the $secondCSV are empty.  Here is some more information for you:
    My $firstCSV file has the following headings:
    VMName  ChargedWA  BillingWA  VMOperatingSystem  VMHost  vCPUs  MemoryGB  StorageGB 
    My $secondCSV file has the following headings:
    VMName  IPAddress  SubnetMask  Gateway  DNSServers  MACAddress  device0  Totalspce0  freespce0  device1  Totalspce1  freespce1  device2  Totalspce2  freespce2
    Each CSV input file has in common the column of VMName.  Most values in VMName are common to both input files but there are some values in VMName that are not in the other input file.  I'm looking to find the following:
    When the same VMname exists in both files, write out all columns for that record from both files into the merged file.
    When a VM name is in $firstCSV but not the second...still write out this record with the values from the $firstCSV.  The column headings from the $secondCSV would be empty for this record.
    When a VM name is in $secondCSV but not the first...still write out this record with the values from the $secondCSV.  The column headings from the $firstCSV would be empty for this record.
    It's funny how I think I've described my issue in my initial post but as I describe it more I further define the details.  I hope I've described my issue for all to understand.
    Thank you.

  • Merge two iCal files- Help

    I have two Macs, a desktop and a Macbook air. The desktop had a problem which kept it off line for quite a while. It is now working. I wanted to merge several years worth of old iCal information onto my Macbook Air calendar, which has only recent and future appointments.  I exported the deskto iCal information into a .icbu file. When I tried to import it into my Macbook Air calendar, I got a warning the the current info would be replaced.  
    Any ideas how to do a clean merger?  There would be few, if any duplicate events.
    Thanks

    Randy,
    Use Calendar>File>Export>Export...on the desired calendar. This will create a .ics file for the selected calendar.
    Transfer the .ics file to your desired computer, double click the .ics file and follow the importing prompts. Make sure you import it into your existing calendar. As you indicated there will be duplicates, but it sounds like you will be able to manage and delete them without consequence.
    These comments are made in consideration that you are NOT using iCloud.

  • Merge Two Xml files ????

    I have two xml files, which I want to merge.
    Both are having same structure�
    Eg. *INPUT-FILE-1*
    <library>
         <book isbn="1">
              <name>Book-11</name>
              <author>steve</author>
              <price>2.99</price>
         </book>
              <book isbn="2">
              <name>Book-22</name>
              <author>john</author>
              <price>12.99</price>
         </book>
    </library>
    *INPUT-FILE-2*
    <library>
         <book isbn="1">
              <name>Book-11</name>
              <author>steve</author>
              <price>2.99</price>
         </book>
              <book isbn="3">
              <name>Book-33</name>
              <author>johnthan</author>
              <price>12.99</price>
         </book>
    </library>
    *OUTPUT-file*
    <library>
         <book isbn="1">
              <name>Book-11</name>
              <author>steve</author>
              <price>2.99</price>
         </book>
              <book isbn="2">
              <name>Book-22</name>
              <author>john</author>
              <price>12.99</price>
         </book>
    </book>
              <book isbn="3">
              <name>Book-33</name>
              <author>johnthan</author>
              <price>12.99</price>
         </book>
    </library>Merge should provide third file without any repetition of any record.
    Which parser to use and how to use ???
    Any help on this ???????????
    Thanks !!

    Merge should provide third file without any repetition of any record.
    Which parser to use and how to use ???Look at JDOM
    Any help on this ???????????One question mark is all that is necessary.

  • Ok, my problem....merging two unique files batch Process

    Ok, my problem....I have been deconstructing films, so I have thousands of picture files for batch processing in Photoshop (Resizing etc) What I would like to do is batch merge two or maybe three lots of deconstructed film footage image files from different sources, one as a background film image file and one as the forground film image file layer, thousands of images all at once, after they have been processed first in photoshop, so I have seperate folders with the image files in each folder, they need to be combined in sequence as I want the image/frame numbers to match up in each folder, then combined to non merged layers and saved into another folder, I want non merged layers, so I can use an action later to balance the overlay. I know premiere and After Effects could maybe do this, but I am looking for a different kind of effect.....thanks 

    This might help, but very probably one of the more experienced Scripters has a Script (possibly with a more comfortable interface or more features) for that, too:
    #target photoshop
    // dialog for folder-selection;
    var theFolderOne = Folder.selectDialog ("select a folder containing the backgoround images");
    var theFolderTwo = Folder.selectDialog ("select a folder containing the foreground images");
    var theFolderThree = Folder.selectDialog ("select a folder to save the combined images to");
    if (theFolderOne && theFolderTwo && theFolderThree) {
    var theFilesOne = theFolderOne.getFiles(checkFor);
    var theFilesTwo = theFolderTwo.getFiles(checkFor);
    // check if both folders contain the same number of files;
    if (theFilesOne.length != theFilesTwo.length) {
    alert ("the folders don’t contain the same number of images")
    // else do the stuff;
    else {
    // create the psd-options;
    psdOpts = new PhotoshopSaveOptions();
    psdOpts.embedColorProfile = true;
    psdOpts.alphaChannels = false;
    psdOpts.layers = true;
    psdOpts.spotColors = true;
    // run through the files;
    for (var a  = 0; a < theFilesOne.length; a++) {
    // open background-image;
    var theFile = app.open(File(theFilesOne[a]));
    theFile.activeLayer = theFile.layers[0];
    // place foreground-image;
    var idPlc = charIDToTypeID( "Plc " );
    var desc6 = new ActionDescriptor();
    var idAs = charIDToTypeID( "As  " );
    var desc7 = new ActionDescriptor();
    var idfsel = charIDToTypeID( "fsel" );
    var idpdfSelection = stringIDToTypeID( "pdfSelection" );
    var idpage = stringIDToTypeID( "page" );
    desc7.putEnumerated( idfsel, idpdfSelection, idpage );
    var idPgNm = charIDToTypeID( "PgNm" );
    desc7.putInteger( idPgNm, 1 );
    var idCrop = charIDToTypeID( "Crop" );
    var idcropTo = stringIDToTypeID( "cropTo" );
    var idboundingBox = stringIDToTypeID( "boundingBox" );
    desc7.putEnumerated( idCrop, idcropTo, idboundingBox );
    var idPDFG = charIDToTypeID( "PDFG" );
    desc6.putObject( idAs, idPDFG, desc7 );
    var idnull = charIDToTypeID( "null" );
    desc6.putPath( idnull, new File( theFilesTwo[a] ) );
    var idFTcs = charIDToTypeID( "FTcs" );
    var idQCSt = charIDToTypeID( "QCSt" );
    var idQcsa = charIDToTypeID( "Qcsa" );
    desc6.putEnumerated( idFTcs, idQCSt, idQcsa );
    var idOfst = charIDToTypeID( "Ofst" );
    var desc8 = new ActionDescriptor();
    var idHrzn = charIDToTypeID( "Hrzn" );
    var idRlt = charIDToTypeID( "#Rlt" );
    desc8.putUnitDouble( idHrzn, idRlt, 0.000000 );
    var idVrtc = charIDToTypeID( "Vrtc" );
    var idRlt = charIDToTypeID( "#Rlt" );
    desc8.putUnitDouble( idVrtc, idRlt, 0.000000 );
    var idOfst = charIDToTypeID( "Ofst" );
    desc6.putObject( idOfst, idOfst, desc8 );
    var idAntA = charIDToTypeID( "AntA" );
    desc6.putBoolean( idAntA, true );
    executeAction( idPlc, desc6, DialogModes.NO );
    // save the combined files;
    theFile.saveAs(new File (theFolderThree + "/file" + bufferNumberWithZeros((a + 1), 4) ), psdOpts)
    theFile.close(SaveOptions.DONOTSAVECHANGES)
    ////// check for psd, tif or jpg //////
    function checkFor (theFile) {
    if (theFile.name.slice(-4) == ".psd" || theFile.name.slice(-4) == ".tif" || theFile.name.slice(-4) == ".jpg") {return true}
    else {return false}
    ////// buffer number with zeros //////
    function bufferNumberWithZeros (number, places) {
    var theNumberString = String(number);
    for (var o = 0; o < (places - String(number).length); o++) {
    theNumberString = String("0" + theNumberString)
    return theNumberString

  • Merge Two WAV File then play the result

    Hi All,
    I'm new In MM, I path for two wav file I want to merge them then play the result,
    anyone can help me asap?
    Thanks in Advance,

    You could do this in FCE by putting stills of your slides on V1 and speaker notes on V2 and adjusting their sizes so that each fills an appropriate portion of the screen. Then export the whole thing as a QuickTime movie which a viewer can start/pause/stop in QuickTime Player. It's not as elegant as what you envision, but I think this approach would work.

  • Merge two mono files to one stero file

    i want to make two mono tracks into one stereo track where one is the left part of the the stereo track and the other the right part...i thought i had done that a long time ago...if possible, how do i do that?
    thx,
    Brick

    Split Stereo files can be converted to Interleaved files. Do that in the Audio window (Copy/convert file).

Maybe you are looking for

  • Create Tablespace on different disk

    Hi! I am about to upgrade SAP ERP 6.0 to EHP4. As one of failed cheks was the insufficient free space in the database. The recommendation given by Tool (EHP Installer) was: > Create TABLESPACE PSAPSR3701 with 53181 MB I also found in the ORATBSXT the

  • Security tools for audit and penetration testing weblogic server 10.3.5.0 and other

    hi all is it possible please introduce me the best softwares for auditing and penetration testing on weblogic server 10.3.5 (scan the machine for finding vulnerabilities and unsecured configuration in web logic server) thanks for your attention good

  • Last 100 rows of a database

    I have an application which needs to connect to a database and retrieve the 100 most recent rows and display them. Now the problem is that this operation must happen every 3-5 seconds. How could I perform this operation? Do I have to use a scrollable

  • I just got a new iPhone S and it won't turn on.

    I just gota  new iPhone 5 S and it won't turn on.  I've tried holding down the button, resetting, and charging.  Sim card is installed and activated.  Any other suggestions?

  • Double Byte Issues inPortal

    Hi,    Can any one help me out with the Double Byte character isuue. The Japaneses Characters are getting printed over lapped inportal screens. Regards. Bharath Mohan N