View Single Post
 
Old 09-29-2023, 08:31 AM
RobiNew RobiNew is offline Windows 10 Office 2016
Competent Performer
 
Join Date: Sep 2023
Posts: 200
RobiNew is on a distinguished road
Default

Please ignore the word 'Selection'. What I need is a modification of the code below so as to replace each m-dash with an n-dash.

Code:
Sub DASHES()
'Testo e Note: Sostituisce m-dash con n-dash
Dim mStory As Range 'Nel testo e nelle note
Dim mRange As Range
For Each mStory In ActiveDocument.StoryRanges 'Ranges = testo e note
mStory.Find.Execute FindText:="^#" & Chr(150) & "^#", ReplaceWith:=Chr$(45)
Next mStory
Set mStory = Nothing
End Sub
Reply With Quote