Hi
Is there any way to determine if some cells in a table are merged under VBA (if possible)? For example, if I select a table under VBA is there a way to determine if it contains merged cells?
Thanks.
Robie
Table with merged cells
-
- gamma jay
- Posts: 25455
- Joined: 17 Mar 2010, 17:33
- Location: Cape Town
Re: Table with merged cells
See this page.
Two macro options to locate merged cells half way down the page...
Two macro options to locate merged cells half way down the page...
Regards,
Rudi
If your absence does not affect them, your presence didn't matter.
Rudi
If your absence does not affect them, your presence didn't matter.
-
- Administrator
- Posts: 78592
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Table with merged cells
Hi Rudi,
That page is for Excel. Robie's question is about Word...
That page is for Excel. Robie's question is about Word...
Best wishes,
Hans
Hans
-
- gamma jay
- Posts: 25455
- Joined: 17 Mar 2010, 17:33
- Location: Cape Town
Re: Table with merged cells
Oops...sorry, I didn't notice the forum Robie was posting in!
According to Hans, checking for merged cells in a Word table is not really possible except for a "for what it's worth..."
See this thread...
According to Hans, checking for merged cells in a Word table is not really possible except for a "for what it's worth..."
See this thread...
Regards,
Rudi
If your absence does not affect them, your presence didn't matter.
Rudi
If your absence does not affect them, your presence didn't matter.
-
- 4StarLounger
- Posts: 508
- Joined: 17 Dec 2010, 03:14
Re: Table with merged cells
You could test the table with code like:
ActiveDocument.Tables(1).Uniform
where 1 is the table #. If the table contains merged cells, or different width columns, the result will be False.
ActiveDocument.Tables(1).Uniform
where 1 is the table #. If the table contains merged cells, or different width columns, the result will be False.
Paul Edstein
[Fmr MS MVP - Word]
[Fmr MS MVP - Word]
-
- 5StarLounger
- Posts: 656
- Joined: 18 Feb 2010, 14:26
Re: Table with merged cells
Thanks Paul. I will give this one a go.macropod wrote:You could test the table with code like:
ActiveDocument.Tables(1).Uniform
where 1 is the table #. If the table contains merged cells, or different width columns, the result will be False.
-
- 5StarLounger
- Posts: 656
- Joined: 18 Feb 2010, 14:26
Re: Table with merged cells
Thanks Rudi and Hans for trying at least.
I am going to try Macropod's suggestion to see if it works.
I am going to try Macropod's suggestion to see if it works.