Merge Cells

V

vqthomf

Hi I am trying to merge two cells 1 in row 2 and 1 in row 3 I am trying to
use the following code if any body can help it would be much appreciated.
TIA
Charles

Sub MergeRowCells()
'
Set myActiveDoc = ActiveDocument
myActiveDoc.Tables(1).Cell(2, 1).Select
Selection.MoveDown Unit:=wdLine, Count:=1, Extend:=wdExtend
Selection.Cells.Merge

End Sub
 
H

Helmut Weber

Hi Charles,

your code _seems_ to work well,
if the cell you select, isn't a merged cell already.

Otherwise, it sometimes works and sometimes doesn't.
I am not able to find out any regularity.

Though, when collapsing the selection
after selecting the cell, it seems always to work.

Greetings from Bavaria, Germany
Helmut Weber, MVP WordVBA
"red.sys" & chr(64) & "t-online.de"
Word 2002, Windows 2000
 

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