Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-16-2025, 08:45 PM
Guessed's Avatar
Guessed Guessed is offline Code Review\Suggestions Windows 10 Code Review\Suggestions Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,163
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

The code looks as compact as you could possibly make it but there could be improvements made.

First, the MsgBox question will recolour the entire document range if you ever choose yes because oRng wasn't redefined to limit itself to just the selection. You probably meant to use the selection {or ActiveDocument.Range(varParts(0), varParts(1))} instead of oRng in this line


oRng.Font.TextColor = wdColorBlack
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Feedback suggestions not using default browser MC147 Office 0 01-28-2023 06:21 AM
Form Letter Help/Suggestions Sociopsychosis Word 2 10-18-2016 05:52 AM
Code Review\Suggestions Word Document Review Procedure Suggestions FedSteve Word 1 09-01-2016 11:23 PM
Code Review\Suggestions How do you turn on/off the word suggestions? JeffL Word 4 12-28-2013 01:12 PM
Code Review\Suggestions Suggestions on how to make an effective table veed Drawing and Graphics 3 04-19-2013 08:36 AM

Other Forums: Access Forums

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