Hola! Mirad tengo este macro al que quisiera meterle un loop hasta el final del documento, hasta que en el documento no encuentre más "Author". Ya lo he intentado por pasiva y por activa y nanai. Me podríais echar una mano, por favor???
Muchas Gracias, agradecería que se tratase con urgencia, me hace falta. Muchas gracias!!!
Selection.Find.ClearFormatting
With Selection.Find
.Text = "Author"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindAsk
.Format = False
.MatchCase = False
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.HomeKey Unit:=wdLine
Selection.MoveDown Unit:=wdLine, Count:=1, Extend:=wdExtend
Selection.Cut
Selection.HomeKey Unit:=wdStory
Selection.PasteAndFormat (wdPasteDefault)
Selection.Find.ClearFormatting
With Selection.Find
.Text = "-----------------------"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindAsk
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.MoveDown Unit:=wdLine, Count:=1
End Sub