Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-11-2017, 01:38 PM
macropod's Avatar
macropod macropod is offline Remove consecutive empty paragraphs within existing macro Windows 7 64bit Remove consecutive empty paragraphs within existing macro Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,366
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

Try:
Code:
Sub DeletePriorAuditResults()
Application.ScreenUpdating = False
With ActiveDocument.Range
  With .Find
    .ClearFormatting
    .Replacement.ClearFormatting
    .Text = "^pPrior Audit Results^p"
    .Replacement.Text = ""
    .Forward = True
    .Wrap = wdFindContinue
    .Format = False
    .MatchCase = False
    .MatchWholeWord = False
    .MatchWildcards = False
    .Execute
  End With
  If .Find.Found = True Then
    .MoveEnd wdTable, 1
    .MoveEnd wdParagraph, 1
    .Text = vbNullString
  End If
End With
Application.ScreenUpdating = True
End Sub

__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Remove consecutive empty paragraphs within existing macro automatic insert hypens until the end of the row and in empty rows between paragraphs Ivica Word 3 12-28-2015 01:31 PM
Remove consecutive empty paragraphs within existing macro making translated paragraphs consecutive user2969 Word 1 01-29-2014 09:00 PM
Delete lots of empty space between paragraphs. FieldTechnician Word 4 10-25-2013 01:14 PM
Remove consecutive empty paragraphs within existing macro Remove empty lines at the top of every page dexter30 Word VBA 2 08-05-2013 08:37 PM
Remove consecutive empty paragraphs within existing macro How to remove that pesky empty Page widescreenforever Word 1 11-28-2012 02:49 PM

Other Forums: Access Forums

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