- #1
C
chrigi
Guest
wenn ich folgendes makro ausführe, wird das von mir gewünschte genau 1 mal durchgeführt. ich hätte aber gerne, dass das makro den gesamten text durchgeht, also bis ans ende des dokumentes. was muss ich tun?
Code:
Sub verschieben1()
Selection.Find.ClearFormatting
With Selection.Find
.Text = @ort!
.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, Extend:=wdExtend
Selection.MoveUp Unit:=wdLine, Count:=1, Extend:=wdExtend
Selection.EndKey Unit:=wdLine, Extend:=wdExtend
Selection.Cut
Selection.MoveUp Unit:=wdLine, Count:=1, Extend:=wdExtend
Selection.MoveDown Unit:=wdLine, Count:=1, Extend:=wdExtend
Selection.HomeKey Unit:=wdLine
Selection.MoveUp Unit:=wdParagraph, Count:=1
Selection.Paste
End Sub