Apply-user-defined table style only to tables with no verticallymerged cells

A

andreas

Dear Experts:

below simple macros applies a user-defined table styles to all tables
in the current document. It works fine.

I wonder whether it is possible...
.... to check each table for vertically merged cells and...
.....only apply the user-defined table style to tables without any
vertically merged cells
.... the index number of tables which have not been worked on because
of this is to be displayed in a msgbox

Hope this is feasible and not beyond the scope of this forum.

Help is much appreciated. Thank you very much in advance.

Regards, Andreas



Sub ApplyTblStyleAllTables

For Each tbl In ActiveDocument.Tables
tbl.Style = ActiveDocument.Styles("TblStyle_Blue")
Next tbl

End Sub
 
D

Doug Robbins - Word MVP

Trap the 5991 error that will occur if you try to access the individual rows
of a table that contains vertically merged cells.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
 
A

andreas

Trap the 5991 error that will occur if you try to access the individual rows
of a table that contains vertically merged cells.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com














- Zitierten Text anzeigen -

Hi Doug,

ok, I got it. Thank you very much for your help.

Regards, Andreas
 

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