It just occurred to me that there would be no need to pass a parameter to declare the number of header rows if the macro could test for it. After a little research, I came up with this code, which seems to work:
Code:
Dim Row as long
With Selection.Tables(1)
'Skip over any header rows
For Row = 1 To .Rows.Count
If .Rows(Row).HeadingFormat <> -1 Then
Exit For
Next Row
Are there any problems with this code or is there a better way?