Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. merging two word file [modified]

merging two word file [modified]

Scheduled Pinned Locked Moved C#
question
7 Posts 7 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    annie_bel
    wrote on last edited by
    #1

    hi! IHi i want to merge two or more text files.i.e. the content of the second file has to append to the content of the first file.

    e.g. abc.doc, ab.doc and xyz.doc i want all three files merged in abc.doc

    give me idea , how can i do this. thanx with regards,

    modified on Wednesday, October 6, 2010 12:52 AM

    R B P 3 Replies Last reply
    0
    • A annie_bel

      hi! IHi i want to merge two or more text files.i.e. the content of the second file has to append to the content of the first file.

      e.g. abc.doc, ab.doc and xyz.doc i want all three files merged in abc.doc

      give me idea , how can i do this. thanx with regards,

      modified on Wednesday, October 6, 2010 12:52 AM

      R Offline
      R Offline
      rah_sin
      wrote on last edited by
      #2

      You can use FileStream for that.

      rahul

      T D 2 Replies Last reply
      0
      • R rah_sin

        You can use FileStream for that.

        rahul

        T Offline
        T Offline
        Thomas Krojer
        wrote on last edited by
        #3

        Word Files? ... Good Joke

        1 Reply Last reply
        0
        • A annie_bel

          hi! IHi i want to merge two or more text files.i.e. the content of the second file has to append to the content of the first file.

          e.g. abc.doc, ab.doc and xyz.doc i want all three files merged in abc.doc

          give me idea , how can i do this. thanx with regards,

          modified on Wednesday, October 6, 2010 12:52 AM

          B Offline
          B Offline
          Blue_Boy
          wrote on last edited by
          #4

          Reading/Writing/Appending a Text File[^]


          I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post. www.aktualiteti.com

          L 1 Reply Last reply
          0
          • A annie_bel

            hi! IHi i want to merge two or more text files.i.e. the content of the second file has to append to the content of the first file.

            e.g. abc.doc, ab.doc and xyz.doc i want all three files merged in abc.doc

            give me idea , how can i do this. thanx with regards,

            modified on Wednesday, October 6, 2010 12:52 AM

            P Offline
            P Offline
            Pete OHanlon
            wrote on last edited by
            #5

            When you say merged, what do you mean? Do you just want the documents appended to each other? What I would do, if I were you, would be to use word automation to open abc.doc and then the other two files; use select all and copy from the other two documents, and move to end and paste in abc.doc.

            I have CDO, it's OCD with the letters in the right order; just as they ruddy well should be

            Forgive your enemies - it messes with their heads

            My blog | My articles | MoXAML PowerToys | Onyx

            1 Reply Last reply
            0
            • R rah_sin

              You can use FileStream for that.

              rahul

              D Offline
              D Offline
              Dave Kreskowiak
              wrote on last edited by
              #6

              No, you can't. You'll be screwing up the content of the second file because you just appended all the Word headers and data (before the content) to the end of the first document, which Word will not expect.

              A guide to posting questions on CodeProject[^]
              Dave Kreskowiak

              1 Reply Last reply
              0
              • B Blue_Boy

                Reading/Writing/Appending a Text File[^]


                I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post. www.aktualiteti.com

                L Offline
                L Offline
                Luc Pattyn
                wrote on last edited by
                #7

                This may come as a surprise, however a Word document is not a text file; it is a complex file that, to all intents and purposes, contains text, but also graphics and images, formatting, page layout information, table of contents, headers and footers, foot notes, possibly revision information, and lots more. You can't concatenate two of those, only a very Word-savvy user can, and he would have to make some tough choices while doing so. :)

                Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum

                Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups