Set Tabs in a Word Table

L

Laura

I would like to change the behavior of my word table's tab
stops. Currently when I hit my tab key my cursor moves
across the table. I want it to move down the table.

For example,

I want the tabs to move down my table starting with dog
then to cat then bird then to rabbit, fox and finally
snake.

dog rabbit
cat fox
bird snake


Any suggestions?
 
M

macropod

Hi Laura,

You can't change the tab key's behaviour. You could use the up/down arrows,
though.

Cheers
 
C

Cindy M -WordMVP-

Hi Laura,
I would like to change the behavior of my word table's tab
stops. Currently when I hit my tab key my cursor moves
across the table. I want it to move down the table.
As "macropod" says, there's no way to change the behavior of
the tab key *IN a table*. (It can be changed outside of
tables, however).

But what you can do is:

1. Place a single column table in a document section
formatted in newspaper columns. The table will break to the
next columns, so TAB will move the way you describe.

2. Remap the command the tab key fires when within a table -
NextCell - by creating a macro of this name. Here's a
possibility that does as you request

Sub NextCell()
If Selection.Information(wdWithInTable) Then
Dim rcount As Long, ccount As Long
Dim ri As Long, ci As Long
Dim tbl As Word.Table

Set tbl = Selection.Tables(1)
ri = Selection.Rows(1).Index
ci = Selection.Columns(1).Index
rcount = tbl.Rows.Count
ccount = tbl.Columns.Count

If ri < rcount Then
'Move down to the next cell
tbl.Cell(ri + 1, ci).Select
ElseIf ri = rcount And ci = ccount Then
'End of the table
Dim rng As Word.Range
Set rng = tbl.Range
rng.Collapse wdCollapseEnd
rng.Select
ElseIf ri = rcount Then
tbl.Cell(1, ci + 1).Select
Else
MsgBox "There's a problem"
End If
End If
End Sub


Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep
30 2003)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow
question or reply in the newsgroup and not by e-mail :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top