ContentControl.DropDownListEntries 屬性

取得代表下拉式清單或下拉式方塊的 ContentControl 所顯示之項目的集合。

命名空間:  Microsoft.Office.Tools.Word
組件:  Microsoft.Office.Tools.Word (在 Microsoft.Office.Tools.Word.dll 中)

語法

'宣告
ReadOnly Property DropDownListEntries As ContentControlListEntries
ContentControlListEntries DropDownListEntries { get; }

屬性值

型別:Microsoft.Office.Interop.Word.ContentControlListEntries
ContentControl 所顯示的項目。

例外狀況

例外狀況 條件
COMException

Type 屬性的值不是 Microsoft.Office.Interop.Word.WdContentControlType.wdContentControlComboBoxMicrosoft.Office.Interop.Word.WdContentControlType.wdContentControlDropdownList

備註

唯有當 ContentControl 代表下拉式清單或下拉式方塊時,才能使用這個屬性。

當您建立一個 ContentControl 代表下拉式清單或下拉式方塊,預設不會包含項目。若要加入項目,請使用 DropDownListEntries 屬性的 Add 方法。

.NET Framework 安全性

請參閱

參考

ContentControl 介面

Microsoft.Office.Tools.Word 命名空間