Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #6  
Old 11-05-2019, 02:36 AM
Guessed's Avatar
Guessed Guessed is offline Adding exceptions to macro Windows 10 Adding exceptions to macro Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,185
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

Dita

If you want to learn to code for exceptions you need to study code already on this forum to see how people have dealt with issues. For instance, a good example of dealing with table content and exceptions can be seen in this thread https://www.msofficeforums.com/word-...ll-tables.html

The code Graham provided is very simplistic and provides a 'test' but doesn't selectively apply formatting to the non-hyperlink parts of the selection. It is an 'all or nothing' approach which looks to see if there are ANY hyperlinks in the selection and if not, formats the whole selection. To apply the colour to chunks of the selection which aren't hyperlinks requires a lot more code and could be approached in few different ways. Probably the easiest would be to format everything selected as red and then loop through any hyperlinks and turn them back to your preferred colour.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
 



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 04:32 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