Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #9  
Old 11-22-2025, 03:17 AM
macropod's Avatar
macropod macropod is offline Macro to delete ending period at the end of a single paragraph Windows 10 Macro to delete ending period at the end of a single paragraph Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,523
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

It would be helpful if you fully described what you're trying to achieve. This constant back & forth is a major time-waster.
Code:
Sub RemovePeriod()
Application.ScreenUpdating = False
With ActiveDocument.Range.Find
  .ClearFormatting: .Replacement.ClearFormatting: .Style = "LeftTitle"
  .Execute FindText:=".^p", ReplaceWith:="^p", Forward:=True, Wrap:=wdFindContinue, Format:=True, Replace:=wdReplaceAll
End With
Application.ScreenUpdating = True
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to delete ending period at the end of a single paragraph Macro to delete table rows based on the absence of a single specific keyword JellehFishh Word VBA 2 06-27-2019 08:23 AM
Highlighting applied to range ending in a paragraph continues to apply to text added after Peterson Word VBA 2 10-08-2018 02:50 PM
Delete starting and ending character of a line Ktulu Word VBA 2 04-26-2018 09:59 AM
Macro to delete ending period at the end of a single paragraph how do you formulate the date by pay period ending? crussell Excel 8 02-23-2016 07:38 AM
Paragraph ending in following page tadlomc Word 1 01-18-2012 05:31 AM

Other Forums: Access Forums

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