T
Tailings
One more thing I am having problems with - I need to find some specific text
- space, period, space, space, PAC. This is the only common item to all the
lines that need to be changed, and always occupies the same position. Once
this is found, I need to go to the beginning of the line (all lines are
actually paragraphs) and delete up to and including the space before PAC.
I need the macro to continue thru the entire document.
I recorded the following:
Sub RemoveBeginningOfLine
Selection.Find.ClearFormatting
With Selection.Find
.Text = ". PAC"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.MoveLeft Unit:=wdWord, Count:=1
Selection.MoveRight Unit:=wdCharacter, Count:=3
Selection.HomeKey Unit:=wdLine, Extend:=wdExtend
Selection.Delete Unit:=wdCharacter, Count:=1
End Sub
How do I make it continue?
- space, period, space, space, PAC. This is the only common item to all the
lines that need to be changed, and always occupies the same position. Once
this is found, I need to go to the beginning of the line (all lines are
actually paragraphs) and delete up to and including the space before PAC.
I need the macro to continue thru the entire document.
I recorded the following:
Sub RemoveBeginningOfLine
Selection.Find.ClearFormatting
With Selection.Find
.Text = ". PAC"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.MoveLeft Unit:=wdWord, Count:=1
Selection.MoveRight Unit:=wdCharacter, Count:=3
Selection.HomeKey Unit:=wdLine, Extend:=wdExtend
Selection.Delete Unit:=wdCharacter, Count:=1
End Sub
How do I make it continue?