Word VBA to change font in 1st row of table

Dear Experts

I need to be able to change the font used in the first row of a word table, so it is set with the following attributes:

Left aligned

I've tried recording a macro but there seems to be no way of selecting the entire row what is recorded only seems to be applicable to a paragraph rather than a table row.

Can anybody help
Who is Participating?
GrahamSkanConnect With a Mentor RetiredCommented:
This should do it for the first table in the document:
Sub RowFont()
    With ActiveDocument.Tables(1).Rows(1).Range
        .Font.Bold = True
        .Font.ColorIndex = wdRed
        .ParagraphFormat.Alignment = wdAlignParagraphCenter
    End With
End Sub

Open in new window

correlateAuthor Commented:
Perfect - thank you very much
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.