Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / August 2005

Tip: Looking for answers? Try searching our database.

Error when changing Table

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Andibevan - 16 Aug 2005 11:37 GMT
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
Helmut Weber - 16 Aug 2005 12:36 GMT
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
Andibevan - 16 Aug 2005 12:47 GMT
Thanks Helmut - that's great :-)

> Hi,
>
[quoted text clipped - 12 lines]
> "red.sys" & chr(64) & "t-online.de"
> Word 2002, Windows 2000
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.