Hi,
Please, how to apply a VBA code to the current paragraph without selecting it at all (in general), in my case, I want to apply a find and replace VBA code to the current paragraph without selecting it (just the pointer is in)
Code:
Sub TestV2()
'
'
Dim Rng As range
Set Rng = Selection.range
With Rng.Find
.Text = "[ñõðóòö~úø]"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchKashida = False
.MatchDiacritics = False
.MatchAlefHamza = False
.MatchControl = False
.MatchWildcards = True
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
I used
Selection.Paragraphs(1).range
for Rng
but does not work
Thanks