Search code examples
svnmergems-wordtortoisesvndocx

Merging docs on SVN without opening it in MS Office editor


I have a docx file in my SVN repository. Now I want different users make changes to it and I want to merge all the changes applied on it (assume there is no conflict) without opening the docx file. I have tried with Tortoise SVN which opens the MS Office review option for that but my application will be a client based one and I do not want to force my client to install MS Office so is there any way to merge changes to a docx file without use of MS Office (if no conflict is there)? In case of conflicts we may allow to edit it by opening file in OpenOffice or other open source editor rather that MS Office.


Solution

  • As suggested by zerkms docx in fact is a binary (zipped directory, to be completely precise) file so I researched for some time and got the hint that by following we can achieve it using XML-aware merge tool.

    • convert docx extention to zip
    • unzip the file
    • save this file/folder in subversion
    • this folder will contain many xml files
    • using XML aware merging tool we can merge in xml file
    • zip the modified folder
    • change the extension to docx

    I will definately find time to implement this and post result over here.