View Single Post
 
Old 07-19-2020, 12:32 AM
alex100 alex100 is offline Windows 7 64bit Office 2016
Advanced Beginner
 
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