![]() |
|
![]() |
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
![]()
Hello, I searched and browsed this forum for a similar question and wasn't able to piece any code together for exactly what I need, so any help would be greatly appreciated. I have a document with a few different fonts/sizes and I only want to turn the Calibri 11.5 pt. black while leaving the rest of the font as-is. Thank you so much in advance!
|
#2
|
|||
|
|||
![]()
You do realize that you can do this using Find, don’t you?
|
#3
|
|||
|
|||
![]()
Like I stated in the beginning of my inquiry, I searched for quite awhile for a similar thread to mine and wasn't able to piece anything together for my exact situation. I guess I should have specifically stated that I used the "Find" field to do that. What's the point of having a forum where less-skilled people ask experts questions if they're just going to get condescending replies?
|
#4
|
|||
|
|||
![]()
Sorry, I didn't realise that asking a question was condescending.
Using Advanced Find you can do a Find and Replace that will apply formatting to all text that has a specific format, without changing either the text or any other formatting. See screenshot below. Last edited by Italophile; 12-14-2022 at 02:07 AM. |
#5
|
||||
|
||||
![]()
Also note that (if your theme fonts are set to Calibri) this find/replace could miss Calibri text that is formatted with a font of "+Body" or ""+Headings"
You can record the actions of this dialog to make a macro version of it.
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#6
|
|||
|
|||
![]() Quote:
All "document cleansing" is based on locating specific items and substituting items with (usually) different characteristics, all the way from text, fonts, sequence numbering and WP5.1 document tables (built with those weird graphic characters) with MSWord tables. I found it expedient to write a single find-and-replace macro and then feed it the input and output characteristics from a table of rules which drove the whole process. I use the same procedure to this day. If you anticipate repeated use of find-and-replace code to change numerous items and/or characteristics, please let me know and I will make my code available to you. Cheers, Chris |
#7
|
|||
|
|||
![]() Quote:
|
#8
|
|||
|
|||
![]() Quote:
|
#9
|
|||
|
|||
![]() Quote:
First the bad news: Recording a simple macro to effect your specific needs doesn't work; at least, I can't make it work. Now for the even worse news: I have confirmed that there is a bug in Recording and a bug in Executing macros to effect a change in colour. Hi everyone else! I use Word2003/VBA, and decided to record a simple Edit/Replace macro to effect a change to ADD a colour to any Courier New font. I chose to change to Orange, any text formatted in Courier New, because my text document was already black font; that doesn't change the form of the macro code. In my text document I had text formatted locally in Courier New, and text formatted with a character style that used Courier New. So both local and style formatting. My recorded macro did NOT record the colour change, although the change took effect while I was recording the macro. I then edited my macro to use ".Replacement.Font.Color = wdColorOrange" and ".Replacement.Style = "csOrange"" with no success. A colleague has since confirmed this behaviour with Word2021. That thread can be read here. Cheers, Chris |
#10
|
|||
|
|||
![]()
Hey Chris, thank you very much for trying. I'll see what kind of other strategies/properties I might be able to use to specify the text that I want changed and will let you know if I figure out a workaround. Again, thanks for trying! Hopefully we'll get to the bottom of it!
|
![]() |
Tags |
font color |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
laith93 | Word VBA | 2 | 11-07-2021 12:52 AM |
Duplicating Ranges and changing Font Attributes | CharlieM | Word VBA | 3 | 08-10-2021 04:44 AM |
![]() |
Swarup | Word | 31 | 08-28-2018 06:55 PM |
Locking Header/Footer on Document but still be able to edit body text (size, font, bold, etc) | Porkie96 | Word | 1 | 06-21-2018 01:56 PM |
![]() |
anacond11 | Word | 2 | 08-08-2013 08:10 AM |