#1
|
|||
|
|||
Replace bold font with different bold font
Hi
I've been searching for a VBA method to change all instances of bold text in a ppt presentation from one font to a different font. I can find code for the font change (using .Replace), what I can't do is put it together with code that will look for instances of bold text and then change the font. I can find code that will search for strings, change colours, underline text... pretty much everything except what I'm trying to do. I'd really appreciate any help with this, and thank you. BigJ |
#2
|
|||
|
|||
I worked it out...
Sub ChangeBolds()
Dim oSld As Slide Dim oSh As Shape Dim x As Long For Each oSld In ActivePresentation.Slides For Each oSh In oSld.Shapes If oSh.HasTextFrame Then With oSh.TextFrame.TextRange For x = 1 To .Runs.Count If .Runs(x).Font.Bold Then .Runs(x).Font.Name = "Futura Std Book" End If Next End With End If Next Next End Sub |
Tags |
bold, change, font |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
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 |
Customised heading styles to bold but they're not coming out bold | seanspotatobusiness | Word | 2 | 06-02-2017 02:26 PM |
how to search and replace BOLD text >> font color change? | dylansmith | Word | 4 | 03-12-2013 09:51 PM |
word 2007 bold not using font | crodgers | Word | 1 | 10-12-2011 04:42 AM |
David.ttf font coming up bold | nazareneisrael | Word | 0 | 01-25-2010 11:07 AM |