![]() |
|
|||||||
|
|
|
Thread Tools | Display Modes |
|
|
|
#1
|
|||
|
|||
|
See if this gets you started
Code:
Sub delblue()
Dim oSld As Slide
Dim oShp As Shape
Dim x As Long
Dim l As Long
Dim i As Long
Dim j As Long
Dim otr As TextRange
For Each oSld In ActivePresentation.Slides
For Each oShp In oSld.Shapes
If oShp.HasTextFrame Then
If oShp.TextFrame.HasText Then
With oShp.TextFrame.TextRange
For x = .Runs.Count To 1 Step -1
If .Runs(x).Font.Color.RGB = RGB(0, 0, 255) Then
Set otr = .Runs(x)
For l = 1 To otr.Length
otr.Characters(l) = "_"
otr.Font.Color.RGB = RGB(120, 120, 120)
Next l
.Runs(x).Font.Subscript = msoFalse
.Runs(x).Font.Superscript = msoFalse
End If
Next x
End With
End If 'has text
End If 'has textframe
If oShp.HasTable Then
For i = 1 To oShp.Table.Rows.Count
For j = 1 To oShp.Table.Columns.Count
If oShp.Table.Cell(i, j).Shape.TextFrame.HasText Then
With oShp.Table.Cell(i, j).Shape.TextFrame.TextRange
For x = .Runs.Count To 1 Step -1
If .Runs(x).Font.Color.RGB = RGB(0, 0, 255) Then
Set otr = .Runs(x)
For l = 1 To otr.Length
otr.Characters(l) = "_"
otr.Font.Color.RGB = RGB(120, 120, 120)
Next l
.Runs(x).Font.Subscript = msoFalse
.Runs(x).Font.Superscript = msoFalse
End If
Next x
End With
End If
Next j
Next i
End If
Next oShp
Next oSld
End Sub
Last edited by JohnWilson; 06-22-2016 at 11:45 PM. |
|
#2
|
|||
|
|||
|
hi john,
thanks for your reply! i like it that the code changes the font to gray color as well. there's a small issue, when there's a line break in the cell like "numbers 123" the word "numbers" get replaced by a "__" but the numbers "123" doesn't. it only gets grayed out. and when running the code, powerpoint goes into "not responding" mode, but it becomes fine again after a while. i'll try tweaking the code to see if i can incorporate yours into the one i currently have. thanks! |
|
| Tags |
| powerpointvba, pptvba, replacefont |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Does anyone know how to remove breaks between tables?
|
chrisd2000 | Word Tables | 18 | 07-02-2014 02:48 PM |
Codes for Word Textbox Font Color?
|
tinfanide | Word VBA | 7 | 10-23-2012 03:13 PM |
| changing default font for new textbox? | dylansmith | PowerPoint | 3 | 10-18-2012 11:12 AM |
| PowerPoint 2007 Textbox Lock / Form Issues | LTechie12 | PowerPoint | 0 | 01-08-2012 02:08 PM |
| Printing in white data in a colored PowerPoint 2007 Chart | bigbizz | PowerPoint | 0 | 08-29-2011 07:47 AM |