Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 02-08-2022, 03:13 AM
Cendrinne's Avatar
Cendrinne Cendrinne is offline Help please, Script to Delete Paragraph marks b4 Tables Windows 10 Help please, Script to Delete Paragraph marks b4 Tables Office 2019
Competent Performer
Help please, Script to Delete Paragraph marks b4 Tables
 
Join Date: Aug 2019
Location: Montreal Quebec Canada
Posts: 200
Cendrinne is on a distinguished road
Default Help please, Script to Delete Paragraph marks b4 Tables

Hello Pros,


Another issue, I can't figure out. At times, I have many tables in a row, seperated with 2 or 3 paragraph marks. Upon Selection, so I have the control to select all the tables I wish to remove the paragraph marks B4 or After a table.

Since they have the same column size and same number of columns, I wish to merge them together.

I already have a macro which I've put the last row with the color Red, so it's OK to merge many tables together.

I have succeeded to do a Cut, but on the last one, I'm in a loop


HTML Code:
   Selection.Select
   
    Selection.Find.ClearFormatting
    With Selection.Find
        .Text = "^p"
        .Wrap = wdFindStop
        .Forward = True
        .MatchWholeWord = True
    End With
    
     Do While Selection.Find.Execute
       If Selection.Find.found Then
         Selection.Cut
    
       Else
    
       Selection.Find.Execute Replace:=wdReplaceAll
       
       End If
     
    Loop
       
    On Error GoTo 0
I've selected all the paragraphs marks in between many tables, but it get's stuck on Loop. So after Forcing to stop Word, i've used F8 for each steps, and I can see why the Loop gets stuck. I don't know how to have it done ONLY on the selection.

Is it possible?

Any insights would be sooooooo appreciated.

Cendrinne.
Reply With Quote
 

Tags
delete paragraph marks



Similar Threads
Thread Thread Starter Forum Replies Last Post
a macro to replace paragraph mark with a space applies effect on paragraph marks after the selection drrr Word VBA 2 08-24-2021 03:05 AM
Help please, Script to Delete Paragraph marks b4 Tables How to delete all the punctuation marks from a paragraph? Jamal NUMAN Word 3 02-26-2019 02:33 PM
Help please, Script to Delete Paragraph marks b4 Tables Paragraph marks appear suddently leonardevens Word 1 07-13-2015 12:14 PM
Finding Paragraph Marks BZee Word 4 02-14-2015 02:12 PM
Help please, Script to Delete Paragraph marks b4 Tables Replace paragraph-marks (line-breaks) in tables with a character-string Aztec Word VBA 2 04-02-2013 10:52 PM

Other Forums: Access Forums

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