Link to home
Start Free TrialLog in
Avatar of Andreas Hermle
Andreas HermleFlag for Germany

asked on

Apply a paragraph style to cells in certain tables using a macro

Dear Experts:

I would like to run a macro with the following requirements:

In the current document the macro is to run thru all the tables and check whether there are tables where ...

... Cell(Row:=2,Column:=1) features the 'Normal' paragraph style

Those tables that fulfill this requirement have to be formatted as follows:

Cells(Row:=2, Column:=4) to Cells(Row:=x, Column:=5) have to be applied a custom made paragraph style 'MyParagraphStyle'

Help is much appreciated.

Thank you very much in advance.

Regards, Andreas
Avatar of Kimputer
Kimputer

When you have the correct cells in a range, use:

.Style = ActiveDocument.Styles("MyParagraphStyle")

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Rgonzo1971
Rgonzo1971

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Andreas Hermle

ASKER

Hi Kimputer,

thank you very much for your swift help. I am afraid to tell you that I am not able to write a macro code, so your code snippet is regrettably of no use to me.

I can understand code quite good but am not able to write a full macro.

Regards, Andreas
You impressed me again! Great job. Thank you very much for your swift and professional help. Really very helpful

Regards, Andreas