Partilhar via


ContentControl.Ungroup Method

Removes the group content control that contains the ContentControl from the document so that the region is no longer protected.

Namespace:  Microsoft.Office.Tools.Word
Assembly:  Microsoft.Office.Tools.Word (in Microsoft.Office.Tools.Word.dll)

Syntax

'Declaration
Sub Ungroup
void Ungroup()

Exceptions

Exception Condition
COMException

The ContentControl is not in a GroupContentControl.

Remarks

You can use a GroupContentControl to prevent users from editing a part of a document. If a ContentControl is nested in a GroupContentControl, you can use the Ungroup method to remove the parent GroupContentControl from the document. If you do this, all of the items that were in the GroupContentControl are no longer protected.

For more information about how to use a GroupContentControl to protect parts of a document, see Content Controls and How to: Protect Parts of Documents by Using Content Controls.

.NET Framework Security

See Also

Reference

ContentControl Interface

Microsoft.Office.Tools.Word Namespace

Other Resources

Content Controls

How to: Protect Parts of Documents by Using Content Controls