Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 05-14-2021, 09:28 PM
macropod's Avatar
macropod macropod is offline Macro to run a few text formatting changes Windows 10 Macro to run a few text formatting changes Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,521
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

Quote:
Originally Posted by Badger75 View Post
this seems to be beyond ... the limits of the macro recorder.
Not at all.

That said, try:
Code:
Sub Demo()
Application.ScreenUpdating = False
With ActiveDocument.Range
  With .Find
    .Format = False
    .Forward = True
    .Wrap = wdFindContinue
    .Text = "[^13^l]{1,}"
    .Replacement.Text = " "
    .Execute Replace:=wdReplaceAll
  End With
  .Font.AllCaps = True
  .CheckSpelling
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 run a few text formatting changes Macro to maintain formatting OR to delete all text (excluding comments) jimmy12 Word VBA 6 05-15-2021 02:48 AM
Replacing a comment with underline or other formatting (or adding that formatting to commented text) paulkaye Word 4 05-16-2016 05:38 AM
Macro to run a few text formatting changes The Logic Behind Apply Formatting of Surrounding Text in Reveal Formatting Pane Instructor Mark Word 4 04-06-2016 01:32 PM
Macro to run a few text formatting changes Use of macro disables paste text with source formatting? Dwellengers Word VBA 1 09-09-2015 06:24 AM
Macro to run a few text formatting changes Macro for text formatting georgekung84 Word VBA 15 08-08-2012 06:28 PM

Other Forums: Access Forums

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