Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.word.tables
|
|||
|
|||
table challenge
Use the following macro:
Dim dtable As Table Dim i As Long, j As Long Set dtable = ActiveDocument.Tables.Add(Selection.Range, 36, 21) dtable.Select With Selection.Borders(wdBorderTop) .LineStyle = Options.DefaultBorderLineStyle .LineWidth = Options.DefaultBorderLineWidth .Color = Options.DefaultBorderColor End With With Selection.Borders(wdBorderLeft) .LineStyle = Options.DefaultBorderLineStyle .LineWidth = Options.DefaultBorderLineWidth .Color = Options.DefaultBorderColor End With With Selection.Borders(wdBorderBottom) .LineStyle = Options.DefaultBorderLineStyle .LineWidth = Options.DefaultBorderLineWidth .Color = Options.DefaultBorderColor End With With Selection.Borders(wdBorderRight) .LineStyle = Options.DefaultBorderLineStyle .LineWidth = Options.DefaultBorderLineWidth .Color = Options.DefaultBorderColor End With With Selection.Borders(wdBorderVertical) .LineStyle = Options.DefaultBorderLineStyle .LineWidth = Options.DefaultBorderLineWidth .Color = Options.DefaultBorderColor End With With Selection.Borders(wdBorderHorizontal) .LineStyle = Options.DefaultBorderLineStyle .LineWidth = Options.DefaultBorderLineWidth .Color = Options.DefaultBorderColor End With With dtable For i = 1 To .Rows.Count Step 2 For j = 2 To .Columns.Count With .Cell(i, j) .Borders(wdBorderTop).Visible = False End With Next j Next i For j = 2 To .Columns.Count With .Cell(i, j) .Borders(wdBorderBottom).Visible = False End With Next j j = 210 For i = 1 To .Rows.Count - 1 Step 2 With .Cell(i, 1) .Range.Text = j .VerticalAlignment = wdCellAlignVerticalCenter End With j = j - 10 Next i For i = 1 To .Rows.Count - 1 Step 2 .Cell(i, 1).Merge Mergeto:=.Cell(i + 1, 1) Next i End With -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "krs1105" wrote in message ... The picture posted at the link below shows a table that I would like to create. This file is a picture so it cannot be revised. Specifically, I would like to reproduce the way that the numbers on the left line up with the lines that separate rows on the right. I do not want the numbers to align with the center of the cells. thanks Ken http://tinyurl.com/crk8mb |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Challenge - How do I make a bullet style where the first word isbold? | Microsoft Word Help | |||
Word 07 Challenge - Line Creep | New Users | |||
A real challenge For Word Gurus... | Formatting Long Documents | |||
Small caps in numbering: A challenge | Microsoft Word Help | |||
how do I make a checklist has dots between the challenge and respo | Microsoft Word Help |