ProtectedForForms Property

Microsoft Word Visual Basic

expression.ProtectedForForms

expression    Required. An expression that returns a Section object.

Remarks

To protect an entire document, use the Protect method of the Document object.

Example

This example turns on form protection for the second section in the active document.

If ActiveDocument.Sections.Count >= 2 Then _
    ActiveDocument.Sections(2).ProtectedForForms = True
		

This example unprotects the first section in the selection.

Selection.Sections(1).ProtectedForForms = False
		

This example toggles the protection for the first section in the selection.

Selection.Sections(1).ProtectedForForms = Not _
    Selection.Sections(1).ProtectedForForms