![]() |
|
|
|
#1
|
||||
|
||||
|
before you go down that path, see: http://office.microsoft.com/en-us/wo...010031067.aspx Quote:
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] |
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Macro to delete all empty rows from all tables
|
braddgood | Word VBA | 15 | 10-02-2015 01:54 PM |
| Find and Delete Rows | damaniam | Word VBA | 1 | 03-11-2014 06:54 AM |
Word Macro to find and delete rows that contain adjacent cells containing "."
|
AlexanderJohnWilley | Word VBA | 7 | 11-08-2012 10:15 AM |
Delete all rows but the last.
|
elky1967 | Word VBA | 14 | 09-21-2012 05:27 AM |
Macro to conditionally delete rows
|
Steve_D | Excel | 2 | 08-24-2012 09:37 PM |