Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 11-02-2023, 08:11 AM
vivka vivka is offline Replace a hard return with a dash in the text of a footnote Windows 7 64bit Replace a hard return with a dash in the text of a footnote Office 2016
Expert
 
Join Date: Jul 2023
Posts: 302
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
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro for Find/replace to remove space before Hard Return AlfredStreich Word VBA 4 01-23-2020 03:59 PM
Replace a hard return with a dash in the text of a footnote Find / Replace hard Carriage Return with Line break. GreenBoy Word 2 03-11-2018 02:32 AM
curly quotes after em-dash or hard space btorrance Word 0 06-07-2013 07:39 AM
Hard return renders upper case clafond Word 2 01-07-2013 12:26 PM
Hard page return? markg2 Outlook 0 09-11-2012 08:49 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:51 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft