Andreas Hermle
asked on
Insert a page break before each of occurrence of a certain term in Column 4 in the currently selected table
Dear Experts:
I got a huge table (spanning over a lot of pages and having no header row) in the Active Document. In Column 4 of this table, the term 'Product' or 'Set' appears off and on.
And now I would like to run a macro ...
... to split this huge table by inserting a page break before each occurrence of the term 'Product'. That is, in the end, the huge table will be split up into, say, 30 tables, each separated by a page break. All these tables will have either the term 'Product' or 'Set' in the 4th column of the first row.
Help is much appreciated. Thank you very much in advance.
Regards, Andreas
I got a huge table (spanning over a lot of pages and having no header row) in the Active Document. In Column 4 of this table, the term 'Product' or 'Set' appears off and on.
And now I would like to run a macro ...
... to split this huge table by inserting a page break before each occurrence of the term 'Product'. That is, in the end, the huge table will be split up into, say, 30 tables, each separated by a page break. All these tables will have either the term 'Product' or 'Set' in the 4th column of the first row.
Help is much appreciated. Thank you very much in advance.
Regards, Andreas
ASKER
Hi FarWest,
thank you very much for your swift and professional help. Works great, the table gets split up into subtables whenever the code hits the terms 'Product' or 'Set'.
But I am afraid to tell you that there is one thing I still would like to get incorporated in this nice code, that is, the ensuing subtables are to be separated by manual page breaks.
Help is much appreciated. Thank you very much in advance.
Regards, Andreas
thank you very much for your swift and professional help. Works great, the table gets split up into subtables whenever the code hits the terms 'Product' or 'Set'.
But I am afraid to tell you that there is one thing I still would like to get incorporated in this nice code, that is, the ensuing subtables are to be separated by manual page breaks.
Help is much appreciated. Thank you very much in advance.
Regards, Andreas
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi Rgonzo,
I was looking for manual page breaks, but the property 'page break before' is also fine.
Thank you very much for your professional and swift support.
Regards, Andreas
I was looking for manual page breaks, but the property 'page break before' is also fine.
Thank you very much for your professional and swift support.
Regards, Andreas
ASKER
Hi Rgonzo,
just in case I may need it in the future, how would your code look like if I wanted to have manual page breaks instead of the property 'PageBreakBefore'
Thank you very much in advance. Regards, Andreas
just in case I may need it in the future, how would your code look like if I wanted to have manual page breaks instead of the property 'PageBreakBefore'
Thank you very much in advance. Regards, Andreas
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi Rgonzo, as always, nice and professional coding from your side. Thank you very much for your professional help.
Regards, Andreas
Regards, Andreas
Open in new window