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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
Microsoft.Office.Tools.Word Namespace
Other Resources
How to: Protect Parts of Documents by Using Content Controls