More than 1 cell

R

rob p

In a table in word 2k template, if check box is checked then the font in
that cell turns bold:
Table has two rows and two cols. This is row 1, col 1.
If ActiveDocument.FormFields(FormfieldName()).CheckBox.Value = True Then
Selection.Cells(1).Range.Font.Bold = True

How can I turn font in cell row 2, col 1 also bold in the same if statement?

thanks

I tried the following but kept erroring out:
Set myTable = ActiveDocument.Tables(1)
myTable.Range.Cells.Add BeforeCell:=myTable.Cell(2, 1)
 
H

Helmut Weber

Hi,

like this:

With Selection
.Cells(1).Range.Font.Bold = True
If .Cells(1).RowIndex < .Tables(1).Rows.Count Then
.Tables(1).Cell(.Cells(1).RowIndex + 1,
..Cells(1).ColumnIndex).Range.Font.Bold = True
End If
End With

Greetings from Bavaria, Germany

Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word XP, Win 98
http://word.mvps.org/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top