A
andreas
Dear Experts:
Below macro sets certain padding values for the selected table.
Regrettably it fails to work on tables with merged cells. Have you got
any idea how to re-write the code so that tables featuring merged
cells also get worked on?
Help is much appreciated. Thank you very much in advance.
Regards, Andreas
Sub SetPadding
Dim myCell As Cell
Dim myRow As row
Dim myTable As Table
Set myTable = Selection.Tables(1)
For Each myRow In myTable.rows
For Each myCell In myRow.Cells
myCell.TopPadding = CentimetersToPoints(0)
myCell.BottomPadding = CentimetersToPoints(0)
myCell.LeftPadding = CentimetersToPoints(0.19)
myCell.RightPadding = CentimetersToPoints(0.19)
myCell.WordWrap = True
myCell.FitText = False
Next
Next
End Sub
Below macro sets certain padding values for the selected table.
Regrettably it fails to work on tables with merged cells. Have you got
any idea how to re-write the code so that tables featuring merged
cells also get worked on?
Help is much appreciated. Thank you very much in advance.
Regards, Andreas
Sub SetPadding
Dim myCell As Cell
Dim myRow As row
Dim myTable As Table
Set myTable = Selection.Tables(1)
For Each myRow In myTable.rows
For Each myCell In myRow.Cells
myCell.TopPadding = CentimetersToPoints(0)
myCell.BottomPadding = CentimetersToPoints(0)
myCell.LeftPadding = CentimetersToPoints(0.19)
myCell.RightPadding = CentimetersToPoints(0.19)
myCell.WordWrap = True
myCell.FitText = False
Next
Next
End Sub