Prev: how to detect that the end of a range is also end of a paragraph?
Next: Normal.dot keeps bugging me!!
From: andreas on 28 Mar 2010 08:28 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
From: Doug Robbins - Word MVP on 28 Mar 2010 17:36 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 "andreas" <andreas.hermle(a)gmx.de> wrote in message news:a82cc82d-2518-46c9-b960-39e0e14a07a4(a)n34g2000yqb.googlegroups.com... > 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 >
From: andreas on 29 Mar 2010 10:09
On 28 Mrz., 23:36, "Doug Robbins - Word MVP" <d...(a)REMOVECAPSmvps.org> wrote: > 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 > > "andreas" <andreas.her...(a)gmx.de> wrote in message > > news:a82cc82d-2518-46c9-b960-39e0e14a07a4(a)n34g2000yqb.googlegroups.com... > > > > > 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- Zitierten Text ausblenden - > > - Zitierten Text anzeigen - Hi Doug, ok, I got it. Thank you very much for your help. Regards, Andreas |