View Single Post
  #5   Report Post  
Posted to microsoft.public.word.tables
GusEvans
 
Posts: n/a
Default Form rows with CheckBoxes

Jezebel-

The user already has a couple of hundred already done - all I need to know
is if there is anyway to effectively compress the unchecked ones with little
or no indication. So far I am using the following code to do it -

Sub CloseUnChecked()
Dim intX As Integer
Dim strRow As String
Dim vCB As CheckBox

Application.ScreenUpdating = False
If ActiveDocument.ProtectionType wdNoProtection Then
ActiveDocument.Unprotect Password:=strPassword
End If
For intX = 1 To 26
strRow = "chkRow" & intX
Set vCB = ActiveDocument.FormFields(strRow).CheckBox
If vCB.Value = False Then
With vCB
.AutoSize = True
.Size = 1
End With
ActiveDocument.Tables(1).Rows(intX).Select
With ActiveDocument.Tables(1).Rows(intX)
.HeightRule = wdRowHeightExactly
.Height = 1
End With
End If
Next
ActiveDocument.Protect Type:=wdAllowOnlyFormFields, Password:=strPassword
End Sub

--
Gus Evans


"Jezebel" wrote:

Use plain text instead of a table, then format the unwanted lines as hidden.
Use a hanging indent for the comment 'column'.