View Single Post
 
Old 02-20-2025, 03:01 AM
Ddadoo57 Ddadoo57 is offline Windows 11 Office 2021
Advanced Beginner
 
Join Date: Feb 2023
Posts: 90
Ddadoo57 is on a distinguished road
Default

if I set
Code:
objDoc.TrackRevisions = true
the replacement with your code gives HiHello… !



my code also works with objDoc.TrackRevisions = false
Code:
texte.Find.ClearFormatting
texte.Find.Replacement.ClearFormatting
texte.Find.MatchWildcards = True
texte.Find.Execute FindText:="…([A-Za-zÀ-ÖØ-öø-ÿ0-9])", ReplaceWith:="… \1", Replace:=wdReplaceAll
and if I set objDoc.TrackRevisions = true, the only code I found was the code I mentioned earlier, namely :
Code:
    With texte 'pour "…[A-Z]"
        With .Find
            .Forward = True: .Wrap = wdFindStop: .MatchWildcards = True
            .Text = "…[A-Za-zÀ-ÖØ-öø-ÿ0-9]"
        End With
        Do While .Find.Execute = True
            .Text = "… " & Right(.Text, 1): .Collapse wdCollapseEnd
        Loop
    End With
Reply With Quote