Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Finding the Value of every ComboBox in a Word document

Status
Not open for further replies.

nochoice

Programmer
Jun 17, 2003
72
CA
I want to take my thread: thread707-586046 A little further.

I've been experimenting with this code, what I want do do now is the same thing except with comboboxes where my combobox's are named ComboBox1, ComboBox2 etc...

First I tried to use the code supplied and find what type of inlineobject a combobox was:


Dim sh As InlineShape
For Each sh In ActiveDocument.InlineShapes
MsgBox sh.Type
Next



except it never seemed to find them - or any other object - it only found the checkboxes, which displayed a message box with a 5 in it. Then I searched VB help and tried a keyword search here as well as google, I am still empty handed.

Any suggestions would be great!

Thanks in Advance,
NoChoice



 
Hi nochoice,

InlineShape Type 5 is wdInlineShapeOLEControlObject which includes your checkboxes and your combos. If you go back and work with the code Skip gave you in your other thread you'll maybe get a little bit further but what exactly do you want? Comboboxes don't have a Caption. To see what properties are available have a look through the properties box in design view.

Enjoy,
Tony
 
Thanks Tony,

That's makes thing a little more clear. I should be able to work with skip's code now.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top