A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Tables
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

table challenge



 
 
Thread Tools Display Modes
  #1  
Old February 3rd, 2009, 01:23 AM posted to microsoft.public.word.tables
krs1105
external usenet poster
 
Posts: 1
Default table challenge

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
  #2  
Old February 3rd, 2009, 04:45 AM posted to microsoft.public.word.tables
Suzanne S. Barnhill
external usenet poster
 
Posts: 31,786
Default table challenge

Create twice the number of rows you need and merge them alternately in the
first column and the rest (or merge only the first column and apply borders
selectively to the rest).

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org

"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



  #3  
Old February 3rd, 2009, 09:26 AM posted to microsoft.public.word.tables
Doug Robbins - Word MVP
external usenet poster
 
Posts: 8,239
Default 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



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:49 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.