View Single Post
 
Old 11-02-2023, 08:11 AM
vivka vivka is offline Windows 7 64bit Office 2016
Expert
 
Join Date: Jul 2023
Posts: 293
vivka is on a distinguished road
Default

Hi, RobiNew! Try this:
Code:
Sub ReplRefNrWithinFootnote()
'Replaces with dash paragraph mark in the text of a footnote

Set parRng = ActiveDocument.StoryRanges(wdFootnotesStory)

On Error Resume Next
    With parRng.Find
      .ClearFormatting
      .Replacement.ClearFormatting
      .Wrap = wdFindStop
      .Format = False
      .MatchWildcards = False
      .text = "^p" 
      While .Execute And parRng.End < ActiveDocument.StoryRanges(wdFootnotesStory).End
        parRng.text = Replace(parRng.text, Chr(13), " " & Chr(150) & " ")
        parRng.Collapse wdCollapseEnd
      Wend
    End With
End Sub
Reply With Quote