View Single Post
 
Old 04-30-2012, 11:00 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,382
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

Hi umesh,

This is the first time you've mentioned anything about the bottom borders. Obviously, if you delete the bottom row, the bottom border gets deleted too. To restore the borders, you need to:
• Dimension three more variables:
Dim BdrClr As Long, BdrWdth As Long, BdrSty As Long
• Insert the following code after 'If UCase(Rng.Text) <> "DATE" And UCase(Rng.Text) <> "PERIOD" Then GoTo NextTable':
Code:
      With .Range.Rows.Last.Borders(wdBorderBottom)
        BdrClr = .Color
        BdrWdth = .LineWidth
        BdrSty = .LineStyle
      End With
• Insert the following code between 'Next' and 'Set Rng = .Range':
Code:
      With .Range.Rows.Last.Borders(wdBorderBottom)
        .LineStyle = BdrSty
        .LineWidth = BdrWdth
        .Color = BdrClr
      End With
If you put the 'shading' code where I suggested, it does remove all the shading from the document. I suspect you have put the code before the final 'Next' statement.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote