Dim objTable As Word.Table For Each objTable In ActiveDocument.Tables objTable.Range.Font.Name = "TimesNewRoman" objTable.Range.Font.Size = 10 With objTable .RightPadding = 5 'measurement in points .LeftPadding = 5 'measurement in points .TopPadding = 0 'measurement in points .BottomPadding = 0 'measurement in points .Rows.SpaceBetweenColumns = CentimetersToPoints(0.2) .Rows.AllowBreakAcrossPages = False .Rows.Alignment = wdAlignRowCenter .Rows.HeightRule = wdRowHeightAuto .Shading.Texture = wdTextureSolid .Shading.ForegroundPatternColor = wdColorWhite .Borders.InsideLineStyle = wdLineStyleSingle .Borders.InsideLineWidth = wdLineWidth050pt .Borders.OutsideLineStyle = wdLineStyleNone .Borders.InsideColor = wdColorGray25 .Range.Cells.VerticalAlignment = wdAlignVerticalTop .PreferredWidthType = wdPreferredWidthPercent .PreferredWidth = 100 With .Rows(1) .Range.Font.Name = "TimesNewRoman" .Range.Font.Size = 10 .Range.Font.Bold = True .Range.ParagraphFormat.Alignment = wdAlignParagraphCenter .Cells.VerticalAlignment = wdAlignVerticalTop .Shading.Texture = wdTexture10Percent .Shading.ForegroundPatternColorIndex = wdBlack .Shading.BackgroundPatternColorIndex = wdWhite .Borders.InsideLineStyle = wdLineStyleSingle .Borders.InsideLineWidth = wdLineWidth050pt .Borders.InsideColor = wdColorGray25 .Borders(wdBorderTop).LineStyle = wdLineStyleSingle .Borders(wdBorderBottom).LineStyle = wdLineStyleSingle .Borders(wdBorderTop).LineWidth = wdLineWidth150pt .Borders(wdBorderBottom).LineWidth = wdLineWidth150pt .Borders(wdBorderTop).Color = wdColorBlack .Borders(wdBorderBottom).Color = wdColorBlack .HeadingFormat = True End With 'end the first row settings With .Rows(.Rows.Count) 'the last row in the table .Borders(wdBorderBottom).LineStyle = wdLineStyleSingle .Borders(wdBorderBottom).LineWidth = wdLineWidth150pt .Borders(wdBorderBottom).Color = wdColorBlack .Borders.InsideLineStyle = wdLineStyleSingle .Borders.InsideLineWidth = wdLineWidth050pt .Borders.InsideColor = wdColorGray25 End With 'end the last row settings End With 'end that table settings Next objTable




Reply With Quote
