ContentControl.Ungroup 方法

从文档中移除包含 ContentControl 的分组内容控件,以使该区域不再受保护。

命名空间:  Microsoft.Office.Tools.Word
程序集:  Microsoft.Office.Tools.Word(在 Microsoft.Office.Tools.Word.dll 中)

语法

声明
Sub Ungroup
void Ungroup()

异常

异常 条件
COMException

ContentControl 不在 GroupContentControl 中。

备注

使用 GroupContentControl 可以防止用户编辑文档的某个部分。 如果 ContentControl 嵌套在 GroupContentControl 中,则可以使用 Ungroup 方法从文档中移除父级 GroupContentControl。 如果执行此操作,则 GroupContentControl 中的所有项都不再受到保护。

有关如何使用 GroupContentControl 保护文档的某个部分的更多信息,请参见内容控件如何:使用内容控件保护文档的某些部分

.NET Framework 安全性

请参见

参考

ContentControl 接口

Microsoft.Office.Tools.Word 命名空间

其他资源

内容控件

如何:使用内容控件保护文档的某些部分