![]() |
#1
|
|||
|
|||
![]()
Hey all,
I'm looking to write a VBA macro that searches the first column of all my tables in powerpoint, and switches a specific text to a different color. I.E. I'd like all my tables that have "Yes" in the first column to switch the text "Yes" to a different color then black font, as doing it manually is going to take a bit of time. Here's what I got so far, but I can't get figure out how to specify the first column only. Appreciate the help! Option Explicit Sub ChangeTextColors() Dim oSl As Slide Dim oSh As Shape Dim lCol As Long Dim lRow As Long Dim x As Long For Each oSl In ActivePresentation.Slides For Each oSh In oSl.Shapes If oSh.HasTable Then With oSh.Table For lCol = 1 To .Columns.Count For lRow = 1 To .Rows.Count With .Cell(lRow, lCol).Shape If .HasTextFrame Then If .TextFrame.HasText Then If .TextFrame.TextRange = "YES" Then .TextFrame.TextRange.Font.Color.RGB = RGB(255, 0, 0) End If End If End If End With Next Next End With End If Next Next End Sub |
Tags |
vba change color, vba powerpoint |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
Document Specialist | Word | 2 | 08-17-2018 05:25 AM |
![]() |
jc491 | Word VBA | 8 | 09-30-2015 06:10 AM |
![]() |
danw | Word | 6 | 04-08-2015 06:24 AM |
How can I temporarily break a 3 column format in order to type a single column paragraph | William P | Word | 1 | 01-04-2015 06:40 PM |
Changing the color of the last column in a chart changes the legend | met0813 | PowerPoint | 0 | 01-03-2014 09:02 AM |