Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.tables
Lala3xl Lala3xl is offline
external usenet poster
 
Posts: 2
Default Need to customize table rows for template

Hi
I set up a template for a discussion group in Microsoft word. The brief
specified that the standard table should work as follows:
If the user inserts the table the first row should be divided up into 2
columns. When the user presses tab or inserts the next row the second row
should only have one column (merged). The third row should have 2 colums
again and the fourt one column etc. I have no idea how to tackle this
problem. Does it require XML coding?

  #2   Report Post  
Posted to microsoft.public.word.tables
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Need to customize table rows for template

If you insert a one row two column table, the following macro will
alternately insert one or two column rows. All odd numbered rows will have
two columns all even numbered rows will have one column. Attach to a toolbar
button or keyboard shortcut.

With Selection
.InsertRowsBelow 1
If ActiveDocument.Tables(1).Rows.Count Mod 2 = 1 Then
.Cells.Split NumRows:=1, NumColumns:=2, MergeBeforeSplit:=True
Else
.Cells.Split NumRows:=1, NumColumns:=1, MergeBeforeSplit:=True
End If
End With

http://www.gmayor.com/installing_macro.htm

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Lala3xl wrote:
Hi
I set up a template for a discussion group in Microsoft word. The
brief specified that the standard table should work as follows:
If the user inserts the table the first row should be divided up into
2 columns. When the user presses tab or inserts the next row the
second row should only have one column (merged). The third row
should have 2 colums again and the fourt one column etc. I have no
idea how to tackle this problem. Does it require XML coding?



  #3   Report Post  
Posted to microsoft.public.word.tables
Lala3xl Lala3xl is offline
external usenet poster
 
Posts: 2
Default Need to customize table rows for template

Thanks this worked perfectly...now to just setup my controls and submit the
template

"Graham Mayor" wrote:

If you insert a one row two column table, the following macro will
alternately insert one or two column rows. All odd numbered rows will have
two columns all even numbered rows will have one column. Attach to a toolbar
button or keyboard shortcut.

With Selection
.InsertRowsBelow 1
If ActiveDocument.Tables(1).Rows.Count Mod 2 = 1 Then
.Cells.Split NumRows:=1, NumColumns:=2, MergeBeforeSplit:=True
Else
.Cells.Split NumRows:=1, NumColumns:=1, MergeBeforeSplit:=True
End If
End With

http://www.gmayor.com/installing_macro.htm

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Lala3xl wrote:
Hi
I set up a template for a discussion group in Microsoft word. The
brief specified that the standard table should work as follows:
If the user inserts the table the first row should be divided up into
2 columns. When the user presses tab or inserts the next row the
second row should only have one column (merged). The third row
should have 2 colums again and the fourt one column etc. I have no
idea how to tackle this problem. Does it require XML coding?




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
How to Customize Outlined Numbered List for Template Use Highstrung Microsoft Word Help 4 March 13th 08 10:48 PM
customize table of contents in Word 2003 Kris Microsoft Word Help 1 October 22nd 07 08:49 PM
Template hierarchy and customize the default word template Template hierarchy and customize the def Microsoft Word Help 4 July 10th 06 09:15 AM
Table in a template that users can add additional rows to? n4srs Tables 1 March 11th 06 08:17 PM
How can I customize the sort order of a Table of Contents? Jill76 Microsoft Word Help 1 May 23rd 05 06:27 PM


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

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"