Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 10-20-2015, 08:26 PM
trillium trillium is offline Find/replace font colour in all header/footer Windows 7 32bit Find/replace font colour in all header/footer Office 2007
Novice
Find/replace font colour in all header/footer
 
Join Date: Oct 2015
Posts: 4
trillium is on a distinguished road
Default

it didn't work in the headers/footers.

There are several different sections, headers/footers don't start on the first page/Section, starts in Sec 3. Most have the "Same as previous" set up though...

Thoughts?

I had tried various combinations of this code, but it only changed the colour in the body, not the Headers/Footers.

Code:
Sub BluetoBlack()
'
' BluetoBlack Macro
'
'
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorBlue
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Color = wdColorAutomatic
With Selection.Find
.Text = ""
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
 
 
Selection.Find.Execute Replace:=wdReplaceAll
 
 
ActiveDocument.Sections(ActiveDocument.Sections.Count).Footers(1).Range.Font.Color = wdColorAutomatic
 
End Sub
I've attached a sample mock-up to this thread.
Attached Files
File Type: doc find replace colour example.doc (119.0 KB, 12 views)

Last edited by trillium; 10-20-2015 at 08:27 PM. Reason: add file
Reply With Quote
 

Tags
colour, font, header and footer



Similar Threads
Thread Thread Starter Forum Replies Last Post
Find/replace font colour in all header/footer Find & Replace in Header/Footer in 1000 files amodiammmuneerk@glenmarkp Word 12 03-05-2018 03:31 AM
Find/replace font colour in all header/footer Created VBA to Find and Replace in Body, Header and Footer with Highlighting the replacement text QA_Compliance_Advisor Word VBA 11 09-23-2014 04:40 AM
Word VBA Find Table Text Shading Colour and replace with another QA_Compliance_Advisor Word VBA 10 09-19-2014 08:36 AM
Find/replace font colour in all header/footer Find & Replace in Header/Footer PReinie Word 6 01-22-2014 06:45 PM
Change font of STYLEREF in Header/Footer SQLUSA Word 4 08-13-2012 01:54 PM

Other Forums: Access Forums

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