Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 04-21-2023, 08:13 AM
ctviggen ctviggen is offline Replacing "any character BUT a period then paragraph return" with space Windows 10 Replacing "any character BUT a period then paragraph return" with space Office 2016
Advanced Beginner
Replacing "any character BUT a period then paragraph return" with space
 
Join Date: Feb 2021
Posts: 54
ctviggen is on a distinguished road
Default

Thank you, and sorry for my delay in responding. I'm now limited to working on macros only at lunch, so it is taking me a while to do anything.


How do I implement what you're suggesting? I tried this, but it's incorrect:


Code:
Selection.Find.Execute FindText:=([:;,]) ^ 13, ReplaceWith:="\1 ", Replace:=wdReplaceAll

What does the ^13 do?



Anyway, I was looking at this, and it's "worse" than I thought. I forgot that lines can also end with characters, e.g., a line could end with "d" from "and" or "r" from "or" or a number of other words. Ugh.


So, basically, after processing, a period followed by a paragraph return should NOT be changed, but every other line ending in a paragraph return SHOULD be modified by replacing the paragraph return with a space.



But your example could get me partway there.
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Split apart "page break" and "paragraph mark" EwenMc Word 4 10-03-2021 02:12 AM
Replacing "any character BUT a period then paragraph return" with space Conditional tied to trying to find a " " space character Dart82 Word VBA 3 10-04-2013 01:47 PM
Wierd symbols inplace of "space", "indentation" etc aka.bhagvanji Word 5 02-16-2012 11:50 AM
Replacing "any character BUT a period then paragraph return" with space The heading doesn't "obey" the "before" space! why? Jamal NUMAN Word 1 07-06-2011 04:25 AM
Replacing "any character BUT a period then paragraph return" with space Replacing a single "l" with a double "ll" MShroff Word 8 01-19-2011 08:43 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:29 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