Click here to start.docm
The code has to be in the ThisDocument module of the project. See attached. I added a 15 seconds warning which you can keep or take out.
Option Explicit
Private Sub StartTimer_Click()
MsgBox "This is a timed 3 minute writing exercise." & vbCr + vbCr _
& "Click ""OK"" to begin.", vbOKOnly, "TIMED WRITING"
Application.OnTime Now + TimeValue("00:02:45"), "Warning"
'Application.OnTime Now + TimeValue("00:03:00"), "Notify"
lbl_Exit:
Exit Sub
End Sub
Sub Warning()
Beep
Application.OnTime Now + TimeValue("00:00:15"), "Notify"
lbl_Exit: Exit Sub
End Sub
Sub Notify()
MsgBox "STOP! STOP! STOP!" & vbCr + vbCr _
& "-----" & vbCr + vbCr _
& "Save & Send to Whyman!!", vbOKOnly, "Congrats! You finished!"
ActiveDocument.Protect wdAllowOnlyReading, , "KTK"
lbl_Exit:
Exit Sub
End Sub