Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.tables
|
|||
|
|||
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
Posted to microsoft.public.word.tables
|
|||
|
|||
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
Posted to microsoft.public.word.tables
|
|||
|
|||
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 | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to Customize Outlined Numbered List for Template Use | Microsoft Word Help | |||
customize table of contents in Word 2003 | Microsoft Word Help | |||
Template hierarchy and customize the default word template | Microsoft Word Help | |||
Table in a template that users can add additional rows to? | Tables | |||
How can I customize the sort order of a Table of Contents? | Microsoft Word Help |