Quote:
Originally Posted by Cendrinne
Hi there,
I've tried to see if I could fix it, but I can't. I've tried also, is to remove ' before the Case 2 To 6: LineWidth = 8, so with the ' or without the ', It doesn't do anything.
|
The line:
Case 2 To 6: LineWidth = 8
does exactly the same thing as:
Case wdLineWidth025pt, wdLineWidth050pt, wdLineWidth075pt: .LineWidth = wdLineWidth100pt
Try:
Code:
Sub FixTableBorders()
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Dim Tbl As Table, Bdr As Border, Cll As Cell
With ActiveDocument
For Each Tbl In .Tables
For Each Cll In Tbl.Range.Cells
For Each Bdr In Cll.Borders
With Bdr
If .LineStyle = wdLineStyleSingle Then
Select Case .LineWidth
Case wdLineWidth025pt, wdLineWidth050pt, wdLineWidth075pt: .LineWidth = wdLineWidth100pt
End Select
End If
End With
Next
Next
Next
End With
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub