G
Gerald Perna
Two weeks ago an MVP (Doug Robbins) gave me this code for
adding the name of the paragraph style in the cells of
tables. It works very well but I just noticed that it
doesn't work in tables with merged cells.
Is there any way to get around that?
Thanks.
Jerry
For i = 1 To ActiveDocument.Tables.Count
For j = 1 To ActiveDocument.Tables(i).Rows.Count
For k = 1 To ActiveDocument.Tables(i).Columns.Count
ActiveDocument.Tables(i).Cell(j,
k).Range.InsertBefore "{" & ActiveDocument.Tables(i).Cell
(j, k).Range.Paragraphs(1).Style & "}" & vbCr
Next k
Next j
Next i
adding the name of the paragraph style in the cells of
tables. It works very well but I just noticed that it
doesn't work in tables with merged cells.
Is there any way to get around that?
Thanks.
Jerry
For i = 1 To ActiveDocument.Tables.Count
For j = 1 To ActiveDocument.Tables(i).Rows.Count
For k = 1 To ActiveDocument.Tables(i).Columns.Count
ActiveDocument.Tables(i).Cell(j,
k).Range.InsertBefore "{" & ActiveDocument.Tables(i).Cell
(j, k).Range.Paragraphs(1).Style & "}" & vbCr
Next k
Next j
Next i