Freigeben über


ContentControl Object Members

Word Developer Reference

An individual content control. Content controls are bounded and potentially labeled regions in a document that serve as containers for specific types of content. Individual content controls may contain contents such as dates, lists, or paragraphs of formatted text. The ContentControl object is a member of the ContentControls collection.

Methods

  Name Description
Bb257505.methods(en-us,office.12).gif Copy Copies the content control from the active document to the Clipboard.
Bb257505.methods(en-us,office.12).gif Cut Removes the content control from the active document and moves the content control to the Clipboard.
Bb257505.methods(en-us,office.12).gif Delete Deletes the specified content control and the contents of the content control.
Bb257505.methods(en-us,office.12).gif SetPlaceholderText Sets the placeholder text that displays in the content control until a user enters their own text.
Bb257505.methods(en-us,office.12).gif ToggleEditPlaceholderText Switches the state between editing the placeholder text for a content control and saving the placeholder text, and returns a Long that represents the state.
Bb257505.methods(en-us,office.12).gif Ungroup Removes a group content control from a document so that its child content controls are no longer nested and can be freely edited.

Properties

  Name Description
Bb257505.properties(en-us,office.12).gif Application Returns an Application object that represents the Microsoft Word application.
Bb257505.properties(en-us,office.12).gif BuildingBlockCategory Returns or sets a String that represents the category for a building block content control. Read/write.
Bb257505.properties(en-us,office.12).gif BuildingBlockType Returns or sets a WdBuildingBlockTypes constant that represents they type of building block for a building block content control. Read/write.
Bb257505.properties(en-us,office.12).gif Creator Returns a 32-bit integer that indicates the application in which the add-in was created. Read-only Long.
Bb257505.properties(en-us,office.12).gif DateCalendarType Returns or sets a WdCalendarType constant that represents the calendar type for a calendar content control. Read/write.
Bb257505.properties(en-us,office.12).gif DateDisplayFormat Returns or sets a String that represents the format in which dates are displayed. Read/write.
Bb257505.properties(en-us,office.12).gif DateDisplayLocale Returns a WdLanguageID that represents the language format for the date displayed in a date content control. Read/write.
Bb257505.properties(en-us,office.12).gif DateStorageFormat Returns or sets a WdContentControlDateStorageFormat that represents the format for storage and retrieval of dates when a date content control is bound to the XML data store of the active document. Read/write.
Bb257505.properties(en-us,office.12).gif DefaultTextStyle Returns or sets a Variant that represents the name of the character style to use to format text in a text content control. Read/write.
Bb257505.properties(en-us,office.12).gif DropdownListEntries Returns a ContentControlListEntries collection that represents the items in a drop-down list content control or in a combo box content control. Read-only.
Bb257505.properties(en-us,office.12).gif ID Returns a String that represents the identification for a content control. Read-only.
Bb257505.properties(en-us,office.12).gif LockContentControl Returns or sets a Boolean that represents whether the user can delete a content control from the active document. Read/write.
Bb257505.properties(en-us,office.12).gif LockContents Returns or sets a Boolean that represents whether the user can edit the contents of a content control. Read/write.
Bb257505.properties(en-us,office.12).gif MultiLine Returns a Boolean that represents whether a text content control allows multiple lines of text. Read/write.
Bb257505.properties(en-us,office.12).gif Parent Returns an Object that represents the parent object of the specified ContentControl object.
Bb257505.properties(en-us,office.12).gif ParentContentControl Returns a ContentControl that represents the parent content control for a content control that is nested inside a rich-text control or group control. Read-only.
Bb257505.properties(en-us,office.12).gif PlaceholderText Returns a BuildingBlock object that represents the placeholder text for a content control. Read-only.
Bb257505.properties(en-us,office.12).gif Range Returns a Range that represents the contents of the content control in the active document. Read-only.
Bb257505.properties(en-us,office.12).gif ShowingPlaceholderText Returns a Boolean that indicates whether the placeholder text for the content control is displayed. Read-only.
Bb257505.properties(en-us,office.12).gif Tag Returns or sets a String that represents a value to identify a content control. Read/write.
Bb257505.properties(en-us,office.12).gif Temporary Returns or sets a Boolean that represents whether to remove a content control from the active document when the user edits the contents of the control. Read/write.
Bb257505.properties(en-us,office.12).gif Title Returns or sets a String that represents the title for a content control. Read/write.
Bb257505.properties(en-us,office.12).gif Type Returns or sets a WdContentControlType that represents the type for a content control. Read/write.
Bb257505.properties(en-us,office.12).gif XMLMapping Returns an XMLMapping object that represents the mapping of a content control to XML data in the data store of a document. Read-only.