Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 11-04-2019, 02:42 AM
dita dita is offline Adding exceptions to macro Windows XP Adding exceptions to macro Office 2010 64bit
Advanced Beginner
Adding exceptions to macro
 
Join Date: Apr 2018
Posts: 34
dita is on a distinguished road
Default

Sorry, this the macro where I want to insert the exception.


I want to change font color to red. The exception are the hyperlinks. Any URL in the document should keep their color without changing to red.


Sub Macro1()
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorAutomatic
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Color = wdColorRed
Selection.Find.Execute Replace:=wdReplaceAll
End Sub


Thanks!
Reply With Quote
 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding exceptions to macro Adding another macro in the macro list Marcia Excel Programming 6 11-07-2018 04:13 AM
Adding exceptions to macro Making exceptions to PROPER Chayes Excel Programming 8 06-05-2018 07:19 AM
Exceptions on my documents Martinod Word 1 03-12-2018 11:53 AM
Adding exceptions to macro Adding to a macro Ulodesk Word VBA 4 03-07-2016 01:40 PM
Autocorrect Exceptions not working danvdr Word 6 05-26-2014 09:37 PM

Other Forums: Access Forums

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