Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #10  
Old 09-09-2022, 03:44 PM
macropod's Avatar
macropod macropod is offline Help with a script for IF with Cell Border LineWidth less than X, then put Y Windows 10 Help with a script for IF with Cell Border LineWidth less than X, then put Y Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,521
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

Try:
Code:
Sub FixTableBorders()
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Dim Tbl As Table, Bdr As Border
With ActiveDocument
  For Each Tbl In .Tables
    With Tbl
      For Each Bdr In .Borders
        With Bdr
          If .LineStyle = wdLineStyleSingle Then
            Select Case .LineWidth
              'Case 2 To 6: .LineWidth = 8
              Case wdLineWidth025pt, wdLineWidth050pt, wdLineWidth075pt: .LineWidth = wdLineWidth100pt
            End Select
          End If
        End With
      Next
    End With
  Next
End With
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 

Tags
helpme, if command, wdlinewidth

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
cell border lineweights bkcell Excel 0 08-20-2017 09:55 AM
Can I type over a cell with a border? Juju37 Excel 0 01-20-2015 07:40 AM
Help with a script for IF with Cell Border LineWidth less than X, then put Y Need to remove a line that isn't a cell border msbytes Word 4 08-15-2011 09:21 AM
Help with a script for IF with Cell Border LineWidth less than X, then put Y Cell border markg2 Excel 10 04-12-2011 05:05 PM
Help with a script for IF with Cell Border LineWidth less than X, then put Y Table cell border markg2 Word Tables 2 01-15-2010 05:22 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:07 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft