Error when changing Table

A

Andibevan

I get the following error when trying to alter the value of a table:-

"Cannot Access individual rows in this collection because the table has
vertically merged cells"

This is the code that causes the problem

With oAppWD.ActiveDocument.Tables(1).rows(1).cells(2) = "V4.0"

(oAppWD = CreateObject("Word.Application") )

How do I change the value of cells within a table where there are vertically
merged cells?

Ta

Andi
 
H

Helmut Weber

Hi,

one way would be, not to use rows and columns at all.

Have a look at this one:

With ActiveDocument.Tables(1).Range
MsgBox .Cells.Count
.Cells(12).Select ' for testing
.Cells(12).Range.Text = "V4.0"
End With


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