![]() |
#1
|
|||
|
|||
![]()
Hi Everyone,
I wonder if anyone can help me out with a VBA macro. I have a word document and I'd like to change the font colour of every other word, so either all the odd words are say Red or all the even words are Red, the remaining words stay the default colour. So I initially started with a word count in the hope of changing this to only count odd or even words, but this didn't work out for me. I then went on to loading all the words into an array with the hope of picking out the odd or even indexed words and the somehow change the colour, but again I'm stuck and can't work out how to do it. I'm not an expert but can do the basics, I've looked around on the web and found something that came close, it changed the colour of every letter but even then it was based on case, so if it was A it would be Red and B would be Blue. It worked, but this didn't help me as I couldn't work out how to get it to look at the words. For the record, a word I'm referring to as text in-between 2 spaces. As I'm working with a different language, sometimes you with get numbers which are not words but are in-between spaces and thus would be treated as a 'word'. Is there anyone that could help and guide me on how I can attain my goal? Any help would be much appreciated. ![]() Thank you |
Tags |
macro font colour, vba change colour |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Word Macro Recorder does not record font colour selection | Ramkay | Word | 1 | 12-02-2020 07:48 AM |
![]() |
thomasoj | Word VBA | 3 | 01-15-2020 06:26 AM |
![]() |
RealmOfCOnfusion | Outlook | 1 | 06-30-2016 09:55 PM |
![]() |
meileetan | Project | 3 | 09-12-2012 07:09 AM |
![]() |
Davidoff78 | Word VBA | 1 | 06-28-2012 05:23 PM |