M
Mark K
Re macro to find style "Main Body Text Char *" and replaced it with
"Main Body Text"
I have older files that need to be edited and sent off. They have the
old Char Char problem. The style I'm concerned with is a created
style "Main Body Text" and its mutations Main Body Text Char Char,
Char Char Char Char, Char Char Char Char Char Char Char Char, and so
forth.
At present I search for these mutations and replace them manually with
"Main Body Text" - they are not linked so that is easy. Then
delete them manually. Problem is some documents have so many it takes
for ever.
If only I had a macro that would find all occurrences of the style
"Main Body Text Char *" and replaced it with "Main Body Text" I
tried the following macro but it does pick them up.
I have read many of the responses and tried solutions, but so far have
not been able to crack my problem.
Any ideas?
Many thanks,
Mark
Sub Macro1()
Selection.Find.ClearFormatting
Selection.Find.Style = ActiveDocument.Styles("Main Body Text Char
*")
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Style = ActiveDocument.Styles("Main Body
Text")
"Main Body Text"
I have older files that need to be edited and sent off. They have the
old Char Char problem. The style I'm concerned with is a created
style "Main Body Text" and its mutations Main Body Text Char Char,
Char Char Char Char, Char Char Char Char Char Char Char Char, and so
forth.
At present I search for these mutations and replace them manually with
"Main Body Text" - they are not linked so that is easy. Then
delete them manually. Problem is some documents have so many it takes
for ever.
If only I had a macro that would find all occurrences of the style
"Main Body Text Char *" and replaced it with "Main Body Text" I
tried the following macro but it does pick them up.
I have read many of the responses and tried solutions, but so far have
not been able to crack my problem.
Any ideas?
Many thanks,
Mark
Sub Macro1()
Selection.Find.ClearFormatting
Selection.Find.Style = ActiveDocument.Styles("Main Body Text Char
*")
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Style = ActiveDocument.Styles("Main Body
Text")