How to detect a collision while merging two documents? RRS feed

  • Question

  • While merging two docx files, assume that some paragraphs are similar but some text may vary(not the entire content). At that time it have to detect the collision of paragraph . How is this possible?. Can anyone help me? Am trying this out in C# using open xml 2.0. Help me plz
    Monday, January 3, 2011 8:38 AM

All replies

  • Hi Anisha,

    Thank you for posting and we are glad to help with you.

    After reading your post, I am not very clear about your exact problem. Could you tell me the meaning or collision of paragraph? Do you mean that you want to judge whether the two paragraph are the same or not, and then decided to how to merge (If they are the same, just keep one; otherwise merge them to one document)? If I have misunderstood you, please let me know.

    I am not very expert at Open Xml and haven't ever tried to merge two documents and compare their paragraph. But I collected the articles about comparing two documents, I think it may do some help to you:

    Try this sample and feel free to follow up.

    Best Regards,

    Bruce Song [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, January 5, 2011 7:18 AM
  • Thank you very much for ur response. U r correct. If two paragraphs are same means add one paragraph into the document otherwise it have to be further processed to make into a single paragraph and then it is appended into the document. This is what am trying to do.
    Thursday, January 6, 2011 8:13 AM