J
JB
Hi all:
I recorded the is macro to help me covert a file to a specific
format. The following works but I need it to repeat through the
entire file:
Selection.Find.ClearFormatting
With Selection.Find
.Text = "cn=""*"""
.Replacement.Text = "oldr"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute
Selection.copy
Selection.EndKey Unit:=wdLine
Selection.Find.ClearFormatting
With Selection.Find
.Text = "newrdn:"
.Replacement.Text = "oldr"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.PasteAndFormat (wdPasteDefault)
Repeat
End Sub
Thanks for all your help in advance!
JB
I recorded the is macro to help me covert a file to a specific
format. The following works but I need it to repeat through the
entire file:
Selection.Find.ClearFormatting
With Selection.Find
.Text = "cn=""*"""
.Replacement.Text = "oldr"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute
Selection.copy
Selection.EndKey Unit:=wdLine
Selection.Find.ClearFormatting
With Selection.Find
.Text = "newrdn:"
.Replacement.Text = "oldr"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.PasteAndFormat (wdPasteDefault)
Repeat
End Sub
Thanks for all your help in advance!
JB