View Single Post
 
Old 07-21-2017, 02:00 AM
Alvaro.passi Alvaro.passi is offline Windows 10 Office 2016
Novice
 
Join Date: Jul 2017
Posts: 6
Alvaro.passi is on a distinguished road
Default

Quote:
Originally Posted by gmaxey View Post
Will take a while to run, but seems to work:

Code:
Sub ScratchMacro()
'A basic Word macro coded by Greg Maxey, http://gregmaxey.com/word_tips.html, 7/20/2017
Dim oTbl As Table
Dim oCell As Cell
  For Each oTbl In ActiveDocument.Tables
    For Each oCell In Selection.Tables(1).Range.Cells
      If Not oCell.Borders(wdBorderTop).Color = RGB(0, 128, 0) Then
        oCell.Borders(wdBorderTop).Color = RGB(0, 128, 0)
      End If
      If Not oCell.Borders(wdBorderBottom).Color = RGB(0, 128, 0) Then
        oCell.Borders(wdBorderBottom).Color = RGB(0, 128, 0)
      End If
    Next oCell
  Next oTbl
lbl_Exit:
  Exit Sub
End Sub
You are the best! Thanks so much!! It works slow, but perfect!
Reply With Quote