View Single Post
 
Old 02-20-2025, 02:07 AM
macropod's Avatar
macropod macropod is offline Windows 10 Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,465
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

OK, use:
…([A-Za-zÀ-ÖØ-öø-ÿ0-9]@>)
for the Find text, as in:
Code:
Sub Demo()
Application.ScreenUpdating = False
With ActiveDocument.Range.Find
  .ClearFormatting
  .Replacement.ClearFormatting
  .Execute FindText:="…([A-Za-zÀ-ÖØ-öø-ÿ0-9]@>)", ReplaceWith:="... \1", _
    MatchWildcards:=True, Format:=False, Wrap:=wdFindContinue, Replace:=wdReplaceAll
End With
Application.ScreenUpdating = True
End Sub
This should prevent the words splitting if you're using Track Changes, since the whole word is replaced.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote