F
Fuzzhead
Tony Jollans wrote the following macro to help me with renaming the style in
the tables in my documents. It works great except for the existing formatting
is lost. After it runs everything is right justified. Is there a way to
modify this to keep the existing formatting? So words that are centered stay
centered; words that are left justified stay left justified and words that
are right justified stay right justified.
Set oDoc = Word.ActiveDocument
Selection.GoTo what:=wdGoToPage, _
which:=wdGoToAbsolute, Count:=2
For Each T In ActiveDocument.Tables
For Each P In T.Range.Paragraphs
If P.Style = "Normal" Then P.Style = "tNormal"
Next P, T
Selection.HomeKey wdStory
the tables in my documents. It works great except for the existing formatting
is lost. After it runs everything is right justified. Is there a way to
modify this to keep the existing formatting? So words that are centered stay
centered; words that are left justified stay left justified and words that
are right justified stay right justified.
Set oDoc = Word.ActiveDocument
Selection.GoTo what:=wdGoToPage, _
which:=wdGoToAbsolute, Count:=2
For Each T In ActiveDocument.Tables
For Each P In T.Range.Paragraphs
If P.Style = "Normal" Then P.Style = "tNormal"
Next P, T
Selection.HomeKey wdStory