View Single Post
 
Old 06-21-2020, 03:47 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

While that is possible, your form would need some revision since some of the options are mutually exclusive - logic dictates that one wouldn't check both Yes/No boxes for the «Are you eligible to work in the UK?» question, for example - better to use a dropdown with Yes/No choices there.

For example, if your document employs formfields, you could use an AutoClose macro like the following in the 'ThisDocument' code module of your document:
Code:
Private Sub AutoClose()
Dim FFld As FormField, Cancel As Boolean: Cancel = False
With ActiveDocument
  For Each FFld In .FormFields
    With FFld
      Select Case .Type
        Case wdFieldFormTextInput: If Trim(.Result) = "" Then Cancel = True: Exit For
        Case wdFieldFormDropDown: If .Result = "Choose" Then Cancel = True: Exit For
      End Select
    End With
  Next
  If Cancel = True Then
    MsgBox "Please complete all the items"
    .Saved = False
    SendKeys "{ESC}"
  End If
End With
End Sub
Using formfields rather than content controls and saving the document in the older .doc format will allow it to be supported on the widest range of Word installations, but the reliance on a macro - which any implementation will necessitate - means the safeguard is easily circumvented by those who don't allow Word to run macros or who use Open Office, for example.

For PC macro installation & usage instructions, see: Installing Macros
For Mac macro installation & usage instructions, see: Word:mac - Install a Macro
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote