View Single Post
  #4   Report Post  
TobyR TobyR is offline
Junior Member
 
Posts: 0
Default

Many thanks for the advice Doug - does this mean however (as I think it does) that I will need one macro per checkbox I want to track in this way?

Quote:
Originally Posted by Doug Robbins - Word MVP View Post
If you assign the bookmark names checkname to the checkbox and textname to
the formfield in which you want the user name to be displayed and texttime
to the formfield in which you want the time to be displayed and you run a
macro containing the following code on exit from the checkname checkbox, it
will populate the textname and texttime formfields with the name of the
user and the time at which the checkbox was checked respectively.

With ActiveDocument
If .FormFields("checkName").CheckBox.Value = True Then
.FormFields("textName").result = Application.UserName
.FormFields("textTime").result = Format(Now, "yyyy-mm-dd -
hh:MM:ss")
Else
.FormFields("textName").result = ""
.FormFields("textTime").result = ""
End If
End With