Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 07-19-2020, 12:32 AM
alex100 alex100 is offline Replace double-paragraphs Windows 7 64bit Replace double-paragraphs Office 2016
Advanced Beginner
Replace double-paragraphs
 
Join Date: May 2020
Posts: 79
alex100 is on a distinguished road
Default Replace double-paragraphs

I have been using the script below to find and replace double-paragraph signs. It works ok, with an exception.

For some reason, it won't work with Quora.com pages. For example, please go to the address below and select & copy all the "Related Questions" text at the bottom of the page...

What makes you buy an Apple product? - Quora

Then paste this content to a Word document, and finally run this script...

Code:
With ActiveDocument.Content.Find
    .Execute FindText:="^p^p", ReplaceWith:="^p", Wrap:=wdFindStop, Replace:=wdReplaceAll
End With
You will see that although the pasted text contains lots of double-paragraphs, the script fails to replace them with a single paragraph mark, as it should.

Any idea how I could make it work, please?



Thank you!

Alex
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Replace double-paragraphs Search and replace, with paragraphs and wildcards alex100 Word VBA 3 05-16-2020 08:43 AM
double spaced within paragraph 2 blank lines between paragraphs BigOldArt Word 1 08-24-2017 09:08 AM
Replace double-paragraphs Replacing till there's no more double paragraphs in the text eduzs Word VBA 25 07-01-2017 04:04 PM
Replace double-paragraphs Find and Replace multiple lines/paragraphs jcw Word 1 11-18-2011 11:47 AM
Replace double-paragraphs outlook double spacing paragraphs GWBDIRECT Outlook 3 04-06-2011 11:29 AM

Other Forums: Access Forums

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