Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-03-2017, 03:54 PM
GAmanda GAmanda is offline How to save  font color to use in a VBA macro Windows 10 How to save  font color to use in a VBA macro Office 2016
Novice
How to save  font color to use in a VBA macro
 
Join Date: Mar 2017
Posts: 1
GAmanda is on a distinguished road
Default How to save font color to use in a VBA macro

I am trying to automate the changing of the font color instead of selecting and then applying the font color from the ribbon.



I'm hoping that I can do this in a macro. I know how to select what I need to change. The problem I have is applying the font color as this will be in a template, so the color can change from document to document based on this template. The color of the whole document is black, but there are several times through out the document were I need to change the font color of certain words or phrases.

Is there a way to either get whatever the color of the font button on the ribbon is or to set this color, which usually would be a custom color, to a variable which I then could apply using with selection.font?
Reply With Quote
  #2  
Old 03-04-2017, 03:31 AM
gmayor's Avatar
gmayor gmayor is offline How to save  font color to use in a VBA macro Windows 10 How to save  font color to use in a VBA macro Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,137
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

Create a paragraph or character style as appropriate that has the colour settings you require then apply it to the text in question.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Advanced Font Color Manipulation In Word: Inserting another color than the surrounding text stuartg Word 1 02-20-2017 12:38 AM
Word macro doesn't change font color Spideriffic Word VBA 8 11-04-2015 03:47 AM
How to save  font color to use in a VBA macro Remove white text background (keeping the font color and page color intact cc3125 Word 1 10-26-2015 06:44 PM
Font Color Question//.Replacement.Font.Color = 12611584 rsrasc Word VBA 3 09-05-2015 09:03 PM
Make a certain font face and font color as default in a document. Singh_Edm Word VBA 2 09-13-2014 08:47 PM

Other Forums: Access Forums

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