Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 01-26-2011, 07:11 PM
macropod's Avatar
macropod macropod is offline Formatting macro Windows 7 32bit Formatting macro Office 2000
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
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 Ulodesk,

When posting code, please use code tags.

Whilst I'm not sure what your table design goals are, the following appears to replicate what your code was doing:
Code:
Sub KTableH()
Dim i As Integer
With Options
  .DefaultBorderLineStyle = wdLineStyleSingle
  .DefaultBorderLineWidth = wdLineWidth050pt
  .DefaultBorderColor = 8284228
End With
With Selection.Tables(1)
  For i = 1 To 8
    Select Case i
      Case 1, 3 - 8
        With .Borders(i)
          .LineStyle = Options.DefaultBorderLineStyle
          .LineWidth = Options.DefaultBorderLineWidth
          .Color = Options.DefaultBorderColor
        End With
      Case Else
        With .Borders(i)
          .LineStyle = wdLineStyleNone
        End With
    End Select
  Next i
  With .Rows(1).Range
    With .Shading
      .Texture = wdTextureNone
      .ForegroundPatternColor = wdColorAutomatic
      .BackgroundPatternColor = 8284228
    End With
    .Borders.Shadow = False
    With .Cells.Borders(wdBorderVertical)
      .LineStyle = wdLineStyleSingle
      .LineWidth = wdLineWidth050pt
      .Color = -603914241
    End With
  End With
End With
With Options
  .DefaultBorderLineStyle = wdLineStyleSingle
  .DefaultBorderLineWidth = wdLineWidth050pt
  .DefaultBorderColor = -603914241
End With
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Formatting macro Help with a macro Takket Word VBA 2 03-28-2014 04:58 PM
need a macro that does the following atomsk Word VBA 0 07-05-2010 07:29 AM
Please help Jarrod Word 1 06-05-2010 06:31 AM
Macro help NEHicks503 Excel 0 04-16-2010 07:29 AM
Formatting macro Formatting Help caution5697 Word 3 04-22-2009 11:53 PM

Other Forums: Access Forums

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