View Single Post
 
Old 09-10-2022, 02:52 PM
macropod's Avatar
macropod macropod is offline Windows 10 Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,366
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by Cendrinne View Post
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
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote