Locks Property
TOC
Collapse the table of content
Expand the table of content

Range.Locks Property (Word)

Office 2013 and later
GitHub-Mark-64px

Contribute to this content

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

Returns a CoAuthLocks collection object that represents all the locks in the range. Read-only.

expression .Locks

expression An expression that returns a Range object.

Use the Locks property to return the CoAuthLocks collection.

Note Note

This property is only available for co-authoring enabled documents. If you attempt to access this property on a document that is not enabled for co-authoring, you will receive a run-time error.

The following code example displays the number of locks in the first paragraph of the active document.

MsgBox ActiveDocument.Paragraphs(1).Range.Locks.Count

Concepts

Other resources

Show:
© 2016 Microsoft