On the cover of the documents I produce I like to put the print date and a version number.
But sometimes… I forget to update the version number, even though I’ve updated the Document Revision Information on the inside pages:
So, I went looking for a solution that would automatically update the front cover every time I added a new version number in the Document Revision Information table.
After several attempt using the { =MAX(Above) } field in the Document Revision Information table (which didn’t work well because it had to be placed in the last row of the table using hidden text if you didn’t want it printed) I figured out that I could apply the MAX function to a Bookmark reference, and that if the table was bookmarked, I could reference the Rows and Columns in the table.
Here’s the steps I took.
Step 1: Bookmark the table.
Select the table, and choose Insert | Bookmark, name the bookmark and click Add. I called my Bookmark DocRevisionInfoTable (MS doesn’t allow spaces in Bookmark names).
Step 2: Formula reference to DocRevisionInfoTable
Now go to the front cover where you need the latest version number calculated, and:
- Press <Ctrl+F9> (Windows) or <Cmd+F9> (Mac OS X) to insert a field code. This will make a stylised pair of braces appear – {} with the cursor between the braces.
- Enter the following text between the braces
{ =MAX(DocRevisionInfoTable A:A) \#"#.0#" }
- Press <F9> to update the field
A little explanation:
The field { =MAX(DocRevisionInfoTable A:A) \#”#.0#” } works like this:
DocRevisionInfoTable is of course the name of the table.
A:A defines the first row of the table. According to this document, I should have been able to use C1 to define the first column, but that didn’t work for me.
\#”#.0#” is a format descriptor.
The \# says “this is a number format”
The “#.0#” says “print all digits before the decimal point, and at least one place after the decimal point”. This means that version 2.0 will print as 2.0 rather than just plain old 2, and if there is a version 2.01 the extra digit after the 0 gets printed too.
RedNectar