Thursday, August 17, 2006

Word Document management using SVN

Seeting Microsoft Word Document Management System
using SVN and TortoiseSVN

Any form of writing is an iterative refinement of thoughts, language, and vocabulary. But, Microsoft Word, one of the most popular editors in the Windows world, does little to facilitate this iterative refinement of the document. Although Microsoft word provides "review" functionality that keeps track of changes in the document, using reviewing functionality makes the document cluttered and messy. Further, Microsoft Word does not provide common functionalities such as comparing, merging, or identifying differences between different versions of the document.

Managing multiple versions of a software code (written in java, C, etc) is a well established technology in the software development world. One such tool that facilitate managing multiple version of the software code is SVN. Yesterday, after getting frustrated with the limited capability of the Microsoft word in managing multiple version of the document, I thought of using SVN. After Googling and searching on blogs, I found that SVN along with TortoiseSVN can be used to setup a free home-made document management system for maintaining word documents. To get you an idea of the power of this free document management system, below is the image of the Microsoft Word (2007) that shows different version of the same document. Notice "new addition" in the title.

The image below shows the
1. The current document on which I am working (lower right panel)
2. The previous version of the same document (upper right panel)
3. Changes in the document. New additions are shown in Red Color (middle panel)
4. Only changes (left panel)




Step by Step instructions to setup Microsoft word document management system
1. download latest SVN
2. Install SVN with default setting
3. Download TortoiseSVN
4. Install TortoiseSVN with default settings
5. After restarting the computer, create a folder, title SVN, on C:\ drive i.e. C:\SVN
6. Right click on the "SVN" folder and select TortoiseSVN > Create Repository here (see fig 2) Select default Native filesystem (FSFS) and click OK. This creates a repository where SVN stores all versions.


7. Now import the files. For this select the folder that contains the files and right click and select TortoiseSVN > Import. In the popup box, select c:\svn for the "url of the repository" and click OK
8. Now create another folder "svn_doc" where ever you want. In this folder we will checkout a copy of all files. For this right click on the folder and select "SVN Checkout" from the context menu.
9. All the files that were imported now should be available in this folder.
10. Now always use files from this new folder. Whenever you edit any file, commit changes to SVN by right click on the file and selecting "SVN commit". To see difference between two versions, select the file and right click and select TortoiseSVN> diff. Mircorsoft word should start and show current file, last saved version, and the differences, as shown in the fig 1.

This setp is required only for Microsoft Office 2007
1. To be able to see the differences in the *.docx file, right click on any file and select TortoiseSVN > setting. In the tree view select Diff Viewer and click on the "Advanced" Button. Select extension .doc and click on edit. Change "doc" to "docs". Alternatively you can create a new extension "docs" and copy the diff viewer location from "doc".

Enjoy free document management system.

42 comments:

Abhishek said...

This is damm cool, could have used it while I was editing my MBA essays.

jocke said...
This comment has been removed by the author.
Anonymous said...

Shouldn't it be docx instead of docs?

Roachy said...

Fantastic :)

Great post

Anonymous said...

This is useful; thanks.

Anonymous said...

This is a great idea . but it does not work for me (docs or docx)

Anonymous said...

Yes. I actually implemented that with Word 2007

Unknown said...

This is a very cool idea.

Concerning .docx:
- use .docx instead of . docs
- switch %base and %mime (if you don't chanced and original versions are exchanged)

Nathan VanHoudnos said...

If you want to just version your Documents folder, instead of checking out svn_doc, you can do an in place import. This is talked about here:

http://subversion.tigris.org/faq.html#in-place-import

I've written up some sloppy, though hopefully helpful directions to it Tortoise SVN style below. Disclaimer: my directions are for Vista, adapt as needed, YMMV.

After step 6, do the following.

7. Go to c:/users/vanhoudn and right-mouse click on the documents folder. Choose Tortoise Svn -> Repo Browser

8. Select file:///C:/svn (or where ever you put your repo), hit OK

9. In the left hand pane, right mouse click "file:///C:/svn" and choose "Create Folder". Type in "Documents", hit okay, and close out of the Repo Browser. (This needs to be the *exact same* name as the directory your wanting to do the in place import for. E.g. for WinXP "My Documents")

10. Go back to c:/users/ in explorer, right mouse click on the vanhoudn directory, and choose SVN Checkout. Click OK, and click okay to the warning about the directory being non-empty. What this will do is checkout the empty Documents directory on top of your full Documents directory. Since svn is smart, it won't blow away your files.

11. You will notice at this point that c:/users/vanhoudn/Documents is under source control (it's got a little green checkmark on it.) However, none of the files have been added to the repository. You can either add them one-at-a-time, or en masse. If you choose to add the one-at-a-time, you have to do it for all of the parent directories. To do it en masse, simply select all the files, right mouse click on your selection, choose TortoiseSVN -> Add, and click OK. That will *mark them* for addition. You're not done yet.

12. To finish, commit your changes. Right mouse click on c:/users/vanhoudns/Documents/, choose SVN Commit. For you import message, say something like "Initial import of Documents folder."

Tiago Franco said...

Hi,

I already do document management with SVN, but I'm having trouble creating unique reference numbers for each document. SVN, unlike document management systems, can't be used to create unique document reference numbers.

Any idea?

Unknown said...

This post is getting old but it helped me three years later.

To update some of the instructions, you don't need to install SVN. Just install TortoiseSVN and you should have all you need.

Today, TortoiseSVN has built-in support for Office 2007, so you don't need to worry about the "docx" extension. It works out of the box.

Anonymous said...

The Word diff function combined with Tortoise integration is jaw-dropping.
MS should package Tortoise with Office ;)

Alexis said...

I often work with doc files. Some days ago I converted doc file into docx and my data was was lost. I didn't know what to do next,and entered in the Google and began searching the tool which could be restore the file. I throve and discovered like software - recovery for word. It determined my trouble quite quickly and free of charge as far as I remembered.

generic cialis said...

Interesting article, added his blog to Favorites

ranjini said...

Wonderful blog & good post.Its really helpful for me, awaiting for more new post. Keep Blogging!



Document Management Software

Anonymous said...

indeed I just learnd that TurtoiseSVN which we use a lot can do the word-diff-thing... it's great!

Does anyone know how to include SVN version numbers INTO the word document, so that you can see the version of the doc in the printout?

Anonymous said...

Hey there! Thank you for sharing your thoughts about document management systems in your area. I am glad to stop by your site and know more about document management systems. Keep it up! This is a good read. You have such an interesting and informative page. I will be looking forward to visit your page again and for your other posts as well.
Versioning is a process by which documents are checked in or out of the document management system, allowing users to retrieve previous versions and to continue work from a selected point. Versioning is useful for documents that change over time and require updating, but it may be necessary to go back to or reference a previous copy.
When implementing a new technology within your company, we work hard to ensure that integration with your existing systems is a seamless process. We also manage staff training to assure that every member of your company understands how to operate the new system so you can get the most out of your new business tools.

document management systems

Thomas Ströter said...

Hi, just one question to the screenshot: is the tripple window layout shown for the word-doc comparison the default view shown after starting the svn diff? Or do you have to do some additional operations to achive that?

Brave Boss said...

I have visited your blog for the first time and found it a well organized blog. Keep sharing nice stuff.
Document management online

John Michle said...

If you want to run your business successfully than you have to do documentation of your business properly. These documents may be used in future.

Field Service Management Software

Anonymous said...

Version 1.7.12 of TortoiseSVN has an bug in the script "c:\Program Files\TortoiseSVN\Diff-Scripts\diff-doc.js". The constant vOffice2013 isn´t defined.

Inset at line 25 "var vOffice2013 = 13;" will fix it.

Alexander Brucksin said...

It is interesting to have Tips&Tricks on Document Management

Unknown said...

After installing TortoiseSVN, You can also integrate SVN into Word by using msofficesvn open source add in.

Check out
https://code.google.com/p/msofficesvn/

After this you dont have to leave the word screen to use SVN.

John Colyer said...

I just came across a Document Management Software which offers wide range of management services of Doc. May your fellow readers can get benefited

Unknown said...

great post, by using document management system and office automation is very helpful and advantageous. It removes the unnecessary spaces and keeps the document safe and secure.

nikkisa889 said...

This really answered my problem, thanks! usa online casino

Kavi Priya said...

Great post!! This can be one particular of the most useful blogs We’ve ever arrive across on this subject. Basically Wonderful. I am also a specialist in this topic so I can understand your hard work.
Document Management Software Dubai
Document Management Software

Aishwarya said...

Somebody necessarily help to make severely posts I might state. This is the first time I frequented your website page and to this point? I surprised with the research you made to create this particular post extraordinary. Well done admin..
Document Management Software India
Document Management Software Chennai

Pooja Rawat said...

Wonderful blog & good post.Its really helpful for me, awaiting for more new post. Keep Blogging! Document Management System

Alice paul said...

ProMIS.ONE is the most organized Document Management Software that manages documents related to various departments in an efficient manner. It stores the documents and sorts them in a proper way and makes it easy for you to locate them when required.

Anonymous said...

Agree with the information.. Document Management Software is the application of tools and techniques to organize the project activities.

Ramya Balan said...

Really, these quotes are the holistic approach towards mindfulness. In fact, all of your posts are. Proudly saying I’m getting fruitfulness out of it what you write and share.
Document Management Software
Electronic Document Management System
Document Management Software Dubai
Cloud Document Management System
Document Management System
Electronic Document Management Software

Anonymous said...

The Le_Meridian Funding Service went above and beyond their requirements to assist me with my loan which i used expand my pharmacy business,They were friendly, professional, and absolute gems to work with.I will recommend  anyone looking for loan to contact. Email..lfdsloans@lemeridianfds.com  Or lfdsloans@outlook.com.WhatsApp ... + 19893943740.

Elena Lily said...

I learn something totally new and challenging on blogs I stumble upon on a daily basis. It will always be interesting to read articles from other authors and practice something from their websites… Document Management Software, document workflow india

Bala Vignesh said...

Well written articles like yours renews my faith in today's writers. The article is very informative. Thanks for sharing such beautiful information.
Document Management Software India
Document Management Software Chennai
Document Management Software
Electronic Document Management System

ComplianceQuest said...

Its a great pleasure reading your post.Its full of information I am looking for.

ISO 9001

Golden Triangle Tour Package said...

Thanks for sharing The Awesome content. I will also share with my friends. Great Content thanks a lot. Golden Triangle Tour Package

ComplianceQuest said...
This comment has been removed by the author.
Anonymous said...

Excellent post! You have shared here piece of informative things. Thank you.

EDMS

David Smith said...



Thank you for this valuable post it was very helpful. I really appreciate your effort. please keep us update. sharetipsinfo is a one-stop solution for all your share market needs. Get Paid Stock Market Tips trial for sure shot profit. All liveShare Market Tips and stock tips are highly accurate backed by proper research.

Anonymous said...

Hello, I just arrived at this website page from the link. I can't read the comments one by one, but it looks like they have something interesting to talk about. What should I comment on? Check: Testimoni Mosehat

HR Software said...


It has been an article that has been described in the best way I have ever read.