View Single Post
 
Old 06-21-2014, 06:03 AM
macropod's Avatar
macropod macropod is offline Windows 7 32bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,369
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote