Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 11-02-2023, 10:03 AM
RobiNew RobiNew is offline Add a spacing character before a hard return Windows 10 Add a spacing character before a hard return Office 2016
Competent Performer
Add a spacing character before a hard return
 
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
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Replace a hard return with a dash in the text of a footnote RobiNew Word VBA 3 11-02-2023 09:22 AM
Macro for Find/replace to remove space before Hard Return AlfredStreich Word VBA 4 01-23-2020 03:59 PM
Add a spacing character before a hard return Find / Replace hard Carriage Return with Line break. GreenBoy Word 2 03-11-2018 02:32 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 08:46 AM.


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