Im in trouble!
I want to replace all instances of heading 1 in a document with heading 2.... no problem if you do it manually through the menus. But if i record i macro the macro dont do a thing!
This is the code that dont do anything:
Selection.Find.Style = wdStyleHeading1
Selection.Find.Replacement.Style = wdStyleHeading2
With Selection.Find
.Text = ""
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Extrmely annoying!
What do i do?
I want to replace all instances of heading 1 in a document with heading 2.... no problem if you do it manually through the menus. But if i record i macro the macro dont do a thing!
This is the code that dont do anything:
Selection.Find.Style = wdStyleHeading1
Selection.Find.Replacement.Style = wdStyleHeading2
With Selection.Find
.Text = ""
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Extrmely annoying!
What do i do?