Document.EnforceStyle Property (Word)

Office 2013 and later

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

Returns or sets a Boolean that represents whether formatting restrictions are enforced in a protected document.

expression .EnforceStyle

expression An expression that returns a Document object.

The following example turns on formatting restrictions in the active document.

ActiveDocument.EnforceStyle = True