Re: Merged cells (Win XP/ Wd2003)

URGH!!

Unfortunately the assumption of that article seems to be that one is using HTML tables, which I'm not..../ :..o[
OK - thanks anyway, looks like my table battle must continue...

btw. any idea why MS thinks that whenever one has inserted a new table within a table they should turn on .allowautofit...
Rather anoying and a constant thread for errors, I'm constantly turning it off and it just keeps re-appearing...GRRRR

Thanks for your answers, so far...

Bests, RD

PS: Wish there were a knob on the TV to turn up the intelligence. There's a knob called "brightness," but that doesn't work

Re: Merged cells (Win XP/ Wd2003)

I don't know if you need to be using HTML tables to use that code. Starting in Word 2000, Microsoft has tried to make tables in Word work like HTML tables, so it's not illogical to pretend that they are HTML tables even while still residing in a Word document. Applying the full-blown Internet Explorer Document Object Model to a Word table probably would be overkill. <img src=/S/grin.gif border=0 alt=grin width=15 height=15> But here I think they are suggesting using regular Word objects and methods.

Upon further review, the method involving columns doesn't sound very practical. Hmmm...

Re: Merged cells (Win XP/ Wd2003)

I once had an urgent need to understand the structure of word tables from within VBA. The really nasty solution I found was a piece of code that started...
<code>
If Not Selection.Information(wdWithInTable) Then Exit Sub
Selection.Tables(1).Range.Copy
Set doc = Application.Documents.Add
doc.Content.Paste
strHTML = doc.HTMLProject.HTMLProjectItems(1).Text
</code>

This gave me a text string (strHTML) which held the complete HTML description of the table. I then had an HTML parsing routine that found all the <TR and <TD tags within my string and located the rowspan and colspan data.

Re: Merged cells (Win XP/ Wd2003)

This revised procedure creates an array by cell number for the first table in the active document. It also illustrates how to ascertain whether the cell is merged using data in that array. Because it is slow to compile, one would want to make this array static if the application permits