View Single Post
 
Old 03-27-2024, 10:58 AM
vivka vivka is offline Windows 7 64bit Office 2016
Competent Performer
 
Join Date: Jul 2023
Posts: 228
vivka is on a distinguished road
Default

Hi! It's not difficult:
Code:
Sub Test()
Dim oRng As range
    Set oRng = selection.range
    With oRng.Find
        .ClearFormatting
        .Replacement.ClearFormatting
        .text = "Y[! ]@" & Chr(13)
        .Format = False
        .Forward = True
        .MatchWildcards = True
        .Wrap = wdFindStop
        .MatchAllWordForms = False
        .MatchSoundsLike = False
        If .Execute Then oRng.Select
    End With
 Set oRng = Nothing
End Sub
Modify the code to meet your needs.
Reply With Quote