View Single Post
 
Old 04-14-2013, 12:13 AM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
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

The simplest method of adding additional blocks/group of cells when the previous ones fill up is to create a custom quick part consisting of a complete block/group and insert that.

As for changing colours when a checkbox is checked, you can add the following code to your document's 'ThisDocument' code module:
Code:
Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean)
Dim Rng As Range
With ContentControl
  If .Type <> wdContentControlCheckBox Then Exit Sub
  With .Range
    If .Information(wdWithInTable) = False Then Exit Sub
    If .Rows(1).Cells.Count = .Cells(1).ColumnIndex Then Exit Sub
    If ContentControl.Checked = True Then
      .Rows(1).Cells(.Cells(1).ColumnIndex + 1).Range.Font.Color = wdColorRed
    Else
      .Rows(1).Cells(.Cells(1).ColumnIndex + 1).Range.Font.Color = wdColorAutomatic
    End If
  End With
End With
End Sub
For installation instructions, see: http://www.gmayor.com/installing_macro.htm
Note: You will need to re-save your document in the .docm format to retain the macro.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote