This documentation is archived and is not being maintained.

ContentControl.Range Property

Office 2007
Returns a Range that represents the contents of the content control in the active document. Read-only.



expression   An expression that returns a ContentControl object.


Use the Range property to access the text, the formatting for the text, and other text properties. For more information, see Working with Range Objects.


The following example inserts a date content control into the active document, and then sets the contents of the content control and specifies that the user cannot edit the contents or delete the control from the document.

Visual Basic for Applications
Dim objCC As ContentControl

Set objCC = ActiveDocument.ContentControls _

objCC.Range.Text = "January 1, 2007"
objCC.LockContents = True
objCC.LockContentControl = True