Hi everyone,

I have created a custom tab, in wich I want all the tools necessary to format a protocol document to be available and easily accessible to the users. How can I create a dropdown list with only the 5 heading styles I will need to use in the protocol? I don't want a list with all the styles in the quick part gallery. Let's say if the styles I use are Heading1, Heading2, Heading3, Heading4 and Heading5, those are the only ones I want listed in the drop down, and when the user needs it, they will select the style from the drop down and apply to the desired text in the document.

3 Years
Discussion Span
Last Post by tinstaafl

Since ComboBox will accept any objects, you can implement a ToString() override in your class that represents the styles. Then in the SelectedIndex event cast the SelectedItem to the class object that represents the styles.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.