Merge Cells in Word 2003

N

ng6971

Hi All,

I have a table in word 2003 with 6 columns and multiple rows. When I select
the entire table to merge the rows of this table it will combine all the
cells (Columns+Rows) into one cell.

The position of table as follow:

R1 C2 C3 C4 C5 C6
R2 --- --- --- --- ---
R3 --- --- --- --- ---
R4 --- --- --- --- ---

Results Needed:
Only columns are merge with leftmost cell of the table and rows are not
merge with them.
R1C2C3C4C5C6
R2---------------
R3---------------
R4---------------

Thanks in advance.
 
S

Stefan Blom

Select one row at a time and merge it. If you need to do this often, you may
want to try the following macro:

Sub MergeRowByRow()
On Error GoTo errhandler
Dim t As Table
Dim r As Row
For Each r In Selection.Tables(1).Rows
r.Cells.Merge
Next r
errhandler:
Exit Sub
End Sub

If you need assistance, see http://www.gmayor.com/installing_macro.htm.
 
N

ng6971

Hi Stefan,

Thanks for solution. Code execute perfectly. Have you know about the
behaviour of merging cells in MS Word 6.0 (This is bundled with MS Office 4.3
ver.). In word 6.0 we just selecting the whole table and execute merge cells
command. The results are same as the macro does it.

Is there any chances to modify the merge cell command behaviour in MS word
2003/2007 or any built-in command to get the results as desired? Thanks for
any assistance.
 

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