Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 07-20-2017, 08:28 PM
gmaxey gmaxey is offline Maybe is impossible? Windows 7 32bit Maybe is impossible? Office 2016
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,635
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

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
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
 

Tags
borders, vba, word tables

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Maybe is impossible? Deleting last page really impossible??? trstew Word 4 07-14-2016 05:24 AM
assing task impossible multitrust Outlook 1 06-18-2014 01:01 AM
Maybe is impossible? Why is it impossible to find anything in Word?!?!? GreatBigBore Word 1 09-03-2012 04:30 PM
A problem that is impossible to solve... A F 1 G 3 Word 0 09-17-2010 09:32 AM
This may be impossible, but I thought I would ask... 00don Excel 2 03-11-2009 09:02 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:13 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