Add time stamp by clicking on button
Hi,
I've designed a word form and the user at the end needs to confirm that it's all been completed accurately and to the best of their knowledge. To do this, I would like them to tick a checkbox which then adds a time stamp and their username after the confirmation statement.
My problem is, that my current code doesn't work as the 'selection' would then be the checkbox - how to I get the macro to add the time stamp and user name into the next paragraph? tried it with selection.movedown but no success. Here's my current code:
Private Sub CheckBox1_Click()
Selection.MoveDown Unit:=wdParagraph, Count:=1, Extend:=wdExtend
Selection.InsertDateTime DateTimeFormat:="dd/MM/yyyy", InsertAsField:= _
False, DateLanguage:=wdEnglishUK, CalendarType:=wdCalendarWestern, _
InsertAsFullWidth:=False
Selection.TypeText Text:=", "
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
"USERNAME ", PreserveFormatting:=True
End Sub
|