Share via


Field.Locked Property (Word)

True if the specified field is locked. Read/write Boolean.

Syntax

expression .Locked

expression Required. A variable that represents a Field object.

Remarks

When a field is locked, you cannot update the field results.

Example

This example inserts a DATE field at the beginning of the selection and then locks the field.

Selection.Collapse Direction:=wdCollapseStart 
Set myField = ActiveDocument.Fields.Add(Range:=Selection.Range, _ 
 Type:=wdFieldDate) 
myField.Locked = True

See Also

Concepts

Field Object

Field Object Members