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

Field Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.