View Single Post
 
Old 01-05-2023, 12:53 AM
Wigi Wigi is offline Windows 10 Office 2019
Novice
 
Join Date: Jun 2019
Posts: 7
Wigi is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
Try:
Code:
Sub Demo()
Application.ScreenUpdating = False
Dim Rng As Range
With Selection
  Set Rng = .Range
  With .Find
    .ClearFormatting
    .Replacement.ClearFormatting
    .Format = False
    .Forward = True
    .Wrap = wdFindStop
    .MatchWildcards = False
    .Text = "^e"
  End With
  Do While .Find.Execute = True
   If .InRange(Rng) = False Then Exit Do
   MsgBox .Endnotes(1).Index
   .Collapse wdCollapseEnd
  Loop
  Rng.Select
End With
Application.ScreenUpdating = True
End Sub
Hello,

Many thanks, this works perfectly !

Wim
Reply With Quote