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. Web Development
  3. ASP.NET
  4. compare two word document

compare two word document

Scheduled Pinned Locked Moved ASP.NET
announcement
6 Posts 2 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
    Amit Agarrwal
    wrote on last edited by
    #1

    hello guys, i need to compare two word document contents.i'm loading both of word document into richtextbox.actually both document are the version of each other.so i want to mark the changes in higher version. i can not use any tool i need to write the code for this. all suggestions are welcome. thanks

    Amit Agarwal

    N 1 Reply Last reply
    0
    • A Amit Agarrwal

      hello guys, i need to compare two word document contents.i'm loading both of word document into richtextbox.actually both document are the version of each other.so i want to mark the changes in higher version. i can not use any tool i need to write the code for this. all suggestions are welcome. thanks

      Amit Agarwal

      N Offline
      N Offline
      N a v a n e e t h
      wrote on last edited by
      #2

      I might be wrong, but try checking bytes. Get byte array for both files and check each locations.

      All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions

      A 1 Reply Last reply
      0
      • N N a v a n e e t h

        I might be wrong, but try checking bytes. Get byte array for both files and check each locations.

        All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions

        A Offline
        A Offline
        Amit Agarrwal
        wrote on last edited by
        #3

        hi, Thanks for the Reply. I tried a lot, but i'm not getting the actual logic for getting the differences between two files while i'm fetching both of them content into the richtextbox. any suggestion on this. Thanks.

        Amit Agarwal

        N 1 Reply Last reply
        0
        • A Amit Agarrwal

          hi, Thanks for the Reply. I tried a lot, but i'm not getting the actual logic for getting the differences between two files while i'm fetching both of them content into the richtextbox. any suggestion on this. Thanks.

          Amit Agarwal

          N Offline
          N Offline
          N a v a n e e t h
          wrote on last edited by
          #4

          Have you checked comparing bytes ? It worked for me here.

          All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions

          A 1 Reply Last reply
          0
          • N N a v a n e e t h

            Have you checked comparing bytes ? It worked for me here.

            All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions

            A Offline
            A Offline
            Amit Agarrwal
            wrote on last edited by
            #5

            ok, that's really great. can u please available me the sample code.bieng a developer, its really bad for asking a code. but i need it.what u suggest. thanks

            Amit Agarwal

            N 1 Reply Last reply
            0
            • A Amit Agarrwal

              ok, that's really great. can u please available me the sample code.bieng a developer, its really bad for asking a code. but i need it.what u suggest. thanks

              Amit Agarwal

              N Offline
              N Offline
              N a v a n e e t h
              wrote on last edited by
              #6

              Use File.ReadAllBytes() to get a byte array of the file. Like this take two byte arrays represents two files. By checking the array length, you will find which is big one. If both are same length, then loop through each bytes and check with the same location in second array. Hope you can make it.

              All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions

              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