View Single Post
 
Old 11-02-2023, 10:03 AM
RobiNew RobiNew is offline Windows 10 Office 2016
Competent Performer
 
Join Date: Sep 2023
Posts: 200
RobiNew is on a distinguished road
Default Add a spacing character before a hard return

I need to insert a spacing character " " before a hard return. I've tried the code here below, but it produces an error. Any idea? Thanks!

Code:
Sub Problem()
Dim aRng As Range
Dim iType As Integer
Dim Para As Paragraph
  For iType = 1 To 2
Set aRng = ActiveDocument.StoryRanges(iType)
For Each Para In aRng.Paragraphs
Para.Range.Characters.Last.InsertBefore " "
Next Para
Next iType
Set aRng = Nothing
End Sub
Reply With Quote