A family of Microsoft word processing software products for creating web, email, and print documents.
That macro is intended for use with legacy form fields and won't do anything with content controls.
Also, the "filling in forms" type of editing restriction is for legacy form fields, not for content controls.
At this point, the simplest way to get your form working is to replace each content control with the corresponding form field. After inserting a form field, click the Properties button to get its properties dialog, which is different from the one for content controls. Put the field's name in the "Bookmark" box -- that name is what the macro will use to identify the field. In the Exit dropdown, select the name of the macro (MustFillIn).
If you prefer to use the content controls, then you need a different macro. This goes in the ThisDocument module of your document or template:
Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean)
If ContentControl.Title = "fullname" And ContentControl.ShowingPlaceholderText = True Then
MsgBox "This field must be filled in.", vbExclamation, "Required Field"
Cancel = True
End If
End Sub
In either of these cases, the macro won't run if the user's cursor never enters the field or content control. If you want the check for an empty field to happen when they save or close the document, regardless of whether the field has been visited, then you need a different macro, one that's unfortunately rather more complicated.