Share via

Check Box: Content Control control cannot be deleted

Anonymous
2017-06-21T10:11:04+00:00

I am constructing a Word table matrix with row titles and column titles. The other cells all contain a check box each which the user either selects or deselects. I want to have all the check boxes with the attribute "Content control cannot be deleted", but this attribute does not seem to copy when I copy the check box. Without having to laboriously set this attribute for each individual check box (a few hundred), is there another option available to assign this attribute to all check boxes?

Microsoft 365 and Office | Word | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Charles Kenyon 167.7K Reputation points Volunteer Moderator
2017-06-21T13:24:42+00:00

You need to select a "range of text" for the group command to activate. Word is picky about this.

For purposes of grouping, in a table a cell can be a range of text. One or more contiguous rows can be a range of text. A column cannot be a range of text. Multiple cells (but not a complete row) cannot be a range of text.

An entire table and more can be a range of text.

The following macro should set all checkbox content controls in a document's body with the property of "no delete."

Sub CheckboxNoDelete()

'   Charles Kenyon

'   May not work for checkboxes inside headers/footers or textboxes, haven't checked

'   Sets property for all checkbox content controls in body of active document to "no delete"

'   Checkbox may still be checked on unchecked

'   21 June 2017

'

    Dim CCtrl As ContentControl

    For Each CCtrl In ActiveDocument.ContentControls

        If CCtrl.Type = wdContentControlCheckBox Then CCtrl.LockContentControl = True

    Next CCtrl

End Sub

For instructions on using, see Graham Mayor's Installing Macros.

Was this answer helpful?

2 people found this answer helpful.
0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Anonymous
    2017-06-22T05:01:11+00:00

    Thank you. The macro did the trick. I have no idea why your other definitions of "range" did not yield satisfactory results, but with the macro I have achieved my objective. Thanks indeed.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2017-06-21T11:47:09+00:00

    Strange, with one check box selected, the Group function is available. With two or more check boxes selected, the Group function is greyed out.

    Was this answer helpful?

    0 comments No comments
  3. Doug Robbins - MVP - Office Apps and Services 323.1K Reputation points MVP Volunteer Moderator
    2017-06-21T11:22:22+00:00

    Select all of the check boxes and anything else that you do not want changed or deleted and the use the Group facility in the Controls section of the Developer tab of the ribbon.

    Was this answer helpful?

    0 comments No comments