S
Steved
Hello from Steved
..Text = "<[A-Za-z]@>"
"finds the first word on the first line"
Selection.Delete Unit:=wdCharacter, Count:=1
"deletes anything left off the first word on the first line."
With Selection.Find.Font
.Size = "30"
.Bold = True
"Finds the next first line with Font 30 and bold.
The below is my attempt, is there a better solution please. Thankyou.
Sub Text()
Dim i As Long, pararange As Range
For i = 1 To ActiveDocument.Paragraphs.Count
Selection.Find.ClearFormatting
With Selection.Find
.Text = "<[A-Za-z]@>"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindStop
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.Extend
Selection.HomeKey Unit:=wdLine
Selection.Delete Unit:=wdCharacter, Count:=1
With Selection.Find.Font
.Size = "30"
.Bold = True
End With
With Selection.Find
.Text = ""
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindStop
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
Selection.Find.Execute
End With
Next i
End Sub
..Text = "<[A-Za-z]@>"
"finds the first word on the first line"
Selection.Delete Unit:=wdCharacter, Count:=1
"deletes anything left off the first word on the first line."
With Selection.Find.Font
.Size = "30"
.Bold = True
"Finds the next first line with Font 30 and bold.
The below is my attempt, is there a better solution please. Thankyou.
Sub Text()
Dim i As Long, pararange As Range
For i = 1 To ActiveDocument.Paragraphs.Count
Selection.Find.ClearFormatting
With Selection.Find
.Text = "<[A-Za-z]@>"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindStop
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.Extend
Selection.HomeKey Unit:=wdLine
Selection.Delete Unit:=wdCharacter, Count:=1
With Selection.Find.Font
.Size = "30"
.Bold = True
End With
With Selection.Find
.Text = ""
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindStop
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
Selection.Find.Execute
End With
Next i
End Sub