before you go down that path, see:
http://office.microsoft.com/en-us/wo...010031067.aspx
Quote:
it would be more useful for me in terms of usability and creation of selection dependencies
|
How are they better for either of those? The deletion code is also more complex than for use with content controls:
Code:
Sub Demo()
Application.ScreenUpdating = False
Dim i As Long, Pwd As String, pState As Variant
With ActiveDocument
If .ProtectionType <> wdNoProtection Then
Pwd = InputBox("Please enter the Password", "Password")
pState = .ProtectionType
.Unprotect Pwd
End If
With .Tables(1).Range
For i = .Rows.Count To 1 Step -1
With .Rows(i)
If .Range.InlineShapes.Count = 1 Then
If .Range.InlineShapes(1).Type = wdInlineShapeOLEControlObject Then
If InStr(.Range.InlineShapes(1).OLEFormat.ClassType, "CheckBox") > 0 Then
If .Range.InlineShapes(1).OLEFormat.Object = False Then
.Delete
End If
End If
End If
End If
End With
Next
End With
If pState <> wdNoProtection Then .Protect Type:=pState, NoReset:=True, Password:=Pwd
End With
Application.ScreenUpdating = True
End Sub