Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-19-2014, 03:35 AM
QA_Compliance_Advisor QA_Compliance_Advisor is offline Word VBA Find Table Text Shading Colour and replace with another Windows 7 32bit Word VBA Find Table Text Shading Colour and replace with another Office 2010 32bit
Advanced Beginner
Word VBA Find Table Text Shading Colour and replace with another
 
Join Date: Jul 2014
Posts: 44
QA_Compliance_Advisor is on a distinguished road
Default

I have this code which seems to only change the first cell.


Code:
Function ChangeLogo(wdDoc)
Dim ocell As Cell
For Each ocell In wdDoc.Range.Cells
  With ocell.Shading
    If .BackgroundPatternColor = RGB(51, 51, 153) Then
    .BackgroundPatternColor = RGB(12, 71, 157)
    .ForegroundPatternColor = wdColorWhite
    End If
  End With
Next
End Function

Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Word VBA Find Table Text Shading Colour and replace with another Macro to find text and replace with form field containing that text iiiiifffff Word VBA 16 06-04-2016 01:47 AM
Find and Replace multiple table columns smakdown61 Word 1 08-28-2014 09:24 PM
Word VBA Find Table Text Shading Colour and replace with another Word VBA Macro to Find and Replace based on the Alt Text of an Image bennymc Word VBA 1 01-27-2014 04:23 PM
Find - Replace Macro using a table list mdw Word 0 08-01-2013 04:36 PM
Word VBA Find Table Text Shading Colour and replace with another Bad view when using Find and Find & Replace - Word places found string on top line paulkaye Word 4 12-06-2011 11:05 PM

Other Forums: Access Forums

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