Reply
 
Thread Tools Display Modes
  #1   Report Post  
Martinre
 
Posts: n/a
Default CHANGING TAB SEQUENCE IN TABLE TEMPLATE

If have built a word template using tables and inserting feilds into the
cells but word defaults the tab seguence left to right than down. I want to
segence the tabs where i want. It may down 5 cells than back up
  #2   Report Post  
Cindy M -WordMVP-
 
Posts: n/a
Default

Hi ?B?TWFydGlucmU=?=,

If have built a word template using tables and inserting feilds into the
cells but word defaults the tab seguence left to right than down. I want to
segence the tabs where i want. It may down 5 cells than back up

This would require a macro solution. Here's some sample code that shows how it
could be done
Sub NextCell()
'Make sure the selection is in a table
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)
'''We need to know where we a
'In which row is the selection?
ri = Selection.Rows(1).Index
'And in which column?
ci = Selection.Columns(1).Index
'How many rows are there
rcount = tbl.Rows.Count
'And how many columns
ccount = tbl.Columns.Count

'If selection is not in the last row
If ri rcount Then
'Move down to the next cell
tbl.Cell(ri + 1, ci).Select

'If it's in the last table cell
ElseIf ri = rcount And ci = ccount Then
Dim rng As Word.Range
Set rng = tbl.Range
'Move outside the table
rng.Collapse wdCollapseEnd
rng.Select
'If the last row, but not the last column
ElseIf ri = rcount Then
'Move to the top of the next column
tbl.Cell(1, ci + 1).Select
Else
'An unexpected situation has occurred
MsgBox "There's a problem"
End If
End If
End Sub


Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
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 :-)

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
CHANGING TAB SEQUENCE IN TABLE TEMPLATE Martinre Tables 1 February 11th 05 08:31 PM
Is there a template for exhibits table of contents? Legal. JoanOC Microsoft Word Help 0 January 26th 05 03:09 PM
My Table numbers keep changing as I add more tables to my doc..... AC Microsoft Word Help 2 January 26th 05 01:26 AM
table in template and border problem LeAnne Tables 1 January 14th 05 09:09 PM
Autoformat table doesn't format font's after changing default font B?atrice Karjalainen Tables 2 December 4th 04 03:58 PM


All times are GMT +1. The time now is 12:53 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"