L
Lighthouse
I'm trying to write a silly little macro that goes to every table in an
active document, looks for a particular style, then sets that selection
to 9 points. I have this:
For Each aTable In ActiveDocument.Tables
Selection.Find.ClearFormatting
Selection.Find.Style = ActiveDocument.Styles("Note")
Selection.Style.Font.Size = 9
Obviously it doesn't work (or I wouldn't be here). When I run this
macro it seems to change whatever style the cursor happens to be at at
the time it starts, from that point forward. it never even seems to get
"into" the tables. If i have the cursor inside a table when i run the
macro it seems to do what i want. I need this to be an auto-open macro.
Any advice? Thanks.
active document, looks for a particular style, then sets that selection
to 9 points. I have this:
For Each aTable In ActiveDocument.Tables
Selection.Find.ClearFormatting
Selection.Find.Style = ActiveDocument.Styles("Note")
Selection.Style.Font.Size = 9
Obviously it doesn't work (or I wouldn't be here). When I run this
macro it seems to change whatever style the cursor happens to be at at
the time it starts, from that point forward. it never even seems to get
"into" the tables. If i have the cursor inside a table when i run the
macro it seems to do what i want. I need this to be an auto-open macro.
Any advice? Thanks.