View Single Post
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default auto update of time when revising a document

You could either create numbered versions e.g.
http://www.gmayor.com/save_numbered_versions.htm
or you could use docvariable fields to store the modification date and
version number. Funnily enough I have just updated my web page on that topic
to demonstrate how that could be done (for the date/time at least). Adding a
version number is simply a matter of incrementing a value stored in a doc
variable each time the document is saved. e.g.

On Error Resume Next
If ActiveDocument.Variables("varVersionNumber").Value = "" Then
ActiveDocument.Variables("varVersionNumber").Value = "1"
Else
ActiveDocument.Variables("varVersionNumber").Value = _
ActiveDocument.Variables("varVersionNumber").Value + 1
End If

Add the code to the two save macros shown at the end of
http://www.gmayor.com/stop_automatic_date_update.htm
and add a docvariable field {DocVariable varVersionNumber} to the document.

The macros on my web page do not update the headers.
You would need to include the example code from
http://www.gmayor.com/installing_macro.htm to update the header/footer
fields.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


"James" wrote in message
...
HI

Just wondered if there is a way of automatically updating the time stamp
and version number in a heading / footer whenever a document is edited?
Eg: in my heading I have:

[doc name] [my name] [date last revised] [version number]

Cheers!

James