Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-28-2019, 09:42 PM
Dave T Dave T is offline Delete blank paragraph below bold, end square bracket Windows 7 64bit Delete blank paragraph below bold, end square bracket Office 2013
Advanced Beginner
Delete blank paragraph below bold, end square bracket
 
Join Date: Nov 2014
Location: Australia
Posts: 66
Dave T is on a distinguished road
Default Delete blank paragraph below bold, end square bracket


Hello All,

I am using a macro to format a system generated report.

I have reused a previous macro to find a paragraph that is bold and ends with a square bracket. The macro finds the square bracket and applies ‘Paragraph Keep With Next’ and applies ‘Space After’ to the paragraph.
The next paragraph after the end square bracket has a blank paragraph inserted.

How can I add a condition to the macro that moves to the next paragraph down and if the paragraph is blank it is deleted ???

Unfortunately I have to live with many other blank paragraphs, so do not want them all deleted.

Regards,
Dave T
Attached Files
File Type: docm Delete specific blank paragraph.docm (20.2 KB, 7 views)
Reply With Quote
  #2  
Old 04-28-2019, 10:32 PM
macropod's Avatar
macropod macropod is offline Delete blank paragraph below bold, end square bracket Windows 7 64bit Delete blank paragraph below bold, end square bracket Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

You could just use an ordinary Find/Replace, where:
Find = ]^p^p
Replace = ]^p
No macros required - though you could incorporate the above into a macro if you really need to.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 04-28-2019, 11:00 PM
Dave T Dave T is offline Delete blank paragraph below bold, end square bracket Windows 7 64bit Delete blank paragraph below bold, end square bracket Office 2013
Advanced Beginner
Delete blank paragraph below bold, end square bracket
 
Join Date: Nov 2014
Location: Australia
Posts: 66
Dave T is on a distinguished road
Default

Once again I appreciate your help Paul.

I had seen many, many posts on deleting blank paragraphs using find and replace with wildcards, but hadn't thought the solution would be so simple.

Regards,
Dave T
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete blank paragraph below bold, end square bracket Remove repeated number after square bracket jeffreybrown Word VBA 8 12-04-2018 06:01 PM
Delete blank paragraph below bold, end square bracket Why when I paste text into word, blank space appears after a paragraph & I can't delete it? AWD Word 3 10-16-2018 01:10 PM
Word 2010 - Remove square-bracket encased string in large document IntestinalWorm Word 1 06-20-2017 01:14 AM
Delete blank paragraph below bold, end square bracket Bold numbers between square brackets jeffreybrown Word 4 02-13-2017 04:32 PM
Delete blank paragraph below bold, end square bracket Delete bookmark and paragraph which is blank dsjk9190 Word VBA 2 01-22-2015 01:15 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:19 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft