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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word - Check All/None 1

Status
Not open for further replies.

tebathe3

Programmer
Jan 17, 2004
89
US
I have a bunch of checkbox fields (from the control box, not the forms toolbar) in a table in Word. I need to create a check all and check none feature. I'm looking for the correct syntax for a line of code that is like: for each control in me.controls. I have tried just that and I get "method or data member not found" I'm guessing I can only use the me.controls with userforms? The checkboxes that are in the toolbox, is msforms the correct class for those? Any ideas?
 
The following code snippet cycles thro all the checkboxes in your active word document and prints out their value (true - checked, False - not checked)

For Each i In Application.ActiveDocument.InlineShapes

If i.OLEFormat.ClassType = "Forms.CheckBox.1" Then

MsgBox i.OLEFormat.Object.Value

End If

Next


Hope this helps

 
Wow I was way off, I didn't know about the inlineshapes property thank you so much this works great.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top