Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 07-14-2022, 04:16 PM
macropod's Avatar
macropod macropod is offline Changing Recorded Macro Selection/Clipboard Method to Range/FormattedText Method Windows 10 Changing Recorded Macro Selection/Clipboard Method to Range/FormattedText Method Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
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 also don't need:
.Font.Size = 14
in the replacement expression.
Code:
Sub Tinkering()
Application.ScreenUpdating = False
With ActiveDocument.Range.Find
  .ClearFormatting
  .Replacement.ClearFormatting
  .Font.Bold = True
  .Font.Size = 14
  .Format = True
  .Forward = True
  .Wrap = wdFindContinue
  .Text = ""
  .Replacement.Text = "[[^&]]"
  .Execute 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
Changing Recorded Macro Selection/Clipboard Method to Range/FormattedText Method Range method Find can't find dates jmcsa3 Excel Programming 1 05-02-2020 06:56 AM
Changing Recorded Macro Selection/Clipboard Method to Range/FormattedText Method Title case macro gets a "type mismatch" error at the Instr method marceepoo Word VBA 1 03-05-2020 09:41 PM
Changing Recorded Macro Selection/Clipboard Method to Range/FormattedText Method Number Format Changing in DocVariable method afshin Word VBA 3 08-06-2017 03:21 PM
Number Format Changing in DocVariable method afshin Word 0 08-02-2017 12:26 AM
Best method(s) for entering multiple notes re diverse range of topics WeThotUWasAToad OneNote 0 05-15-2016 02:17 PM

Other Forums: Access Forums

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