ContentControl.Type 属性

定义

返回或设置内容控件的类型。 读/写。

public:
 property Microsoft::Office::Interop::Word::WdContentControlType Type { Microsoft::Office::Interop::Word::WdContentControlType get(); void set(Microsoft::Office::Interop::Word::WdContentControlType value); };
public Microsoft.Office.Interop.Word.WdContentControlType Type { get; set; }
member this.Type : Microsoft.Office.Interop.Word.WdContentControlType with get, set
Public Property Type As WdContentControlType

属性值

WdContentControlType

注解

可以使用 Type 属性将内容控件的类型从一种类型更改为另一种类型。 但是,可以更改控件的类型取决于原始类型和内容控件中的内容更改时。 所有内容控件可以变为富文本或构建基块库类型的内容控件,因为这些类型允许任意内容。 对于其他类型,如果内容类型是有效的,您想要更改,然后更改类型被允许。 否则,将拒绝该更改,从而导致运行时错误。

适用于