tags:

views:

228

answers:

3

CVS has the keyword substitution feature: in a text file you write $Header$ and, when you commit the file, CVS substitutes $Header$ with something like $Header: /repo/src.cpp,v 1.6 2009/03/12 14:53:14 luser Exp $

Is it possible to get the same feature when dealing with a binary Microsoft Word file?

Thank you.

+2  A: 

The basic problem you have with a Word file is that it is effectively a binary file (as opposed to a plain-text file), so you cannot be sure a key string like "$Header$" doesn't appear somewhere (VB macro code, for example) by accident. CVS would expand that key string, and suddenly something apparently unrelated (VB macro code, for example...) stops working.

DevSolar
A: 

Using CVS? Not likely. Even if $Header$ doesn't appear anywhere in your Word document (as DevSolar suggested it might), where do you place that string? Word stores text in its proprietary binary format, but CVS looks for plain text.

On the other hand, I'm sure you can achieve the effect by using either an XML Word format, or a Word macro.

Can Berk Güder
>where do you place that string?What about "File"->"Properties" where we can put document title or keywords?
uvts_cvs
@uvts_cvs: aren't those fields are stored as binary, too?
Can Berk Güder
A: 

Seems almost impossible with the traditional .doc format. Some creative work might allow you to create a process for making it happen with the newer XML format. I'm not sure CVS can do the job even then, but using a post-commit hook in subversion might make it more reasonable to pull off.

acrosman