Wednesday, May 30, 2007

PowerPoint Quickie: Replace Fonts

When I started this blog a few months ago, I promised myself I would not let it die after a few weeks, unlike many other blogs. But I have to admit, keeping it alive has been more of a struggle than I thought. It just takes a lot of time and energy to regularly publish something that is worthwhile reading. I'm not running out of ideas, I'm just having difficulties finding the time to put them into quality posts.

Anyway, at least this is another Quickie for you. Sometimes, when you receive a PowerPoint presentation or some Powerpoint slides that you want to reuse in your own presentation, the fonts of text boxes don't match. The previous versions of PowerPoint had a nice feature to replace a specific font with another one for all slides of your presentation.

PowerPoint 2007 still has that feature, but I couldn't find it. So I went to the Office website and looked at the Interactive Guide for PowerPoint that shows where to find a command in office 2007 if you know where it was in Office 2003.
It turned out it was surprisingly straightforward: it's on the Home tab of the Ribbon, in the Replace-button.

Don't click the button itself, but the drop-down arrow next to it, and you'll be able to replace fonts quickly.

5 comments:

Unknown said...

helpfu.

Anonymous said...

I tried this just now, but got this...

"You tried to replace a double byte font with a single byte font. Use a double byte font instead"

Microsoft don't make it easy, do they?

Anonymous said...

True, but Microsoft does allow you to select every bit of bad font text and manually change the font ... yep, not in my "100 things to do before youre 40" list either, so this is why I wrote this Visual Basic macro recently to do it for me:

Sub trfont()

Dim myFont As String

For Each eachSlide In ActivePresentation.Slides
For Each s In eachSlide.Shapes
If s.HasTextFrame And s.TextFrame.HasText Then
'Good place to prompt start of each text box, or offer exit option
'w can also be "Characters" if some Words contain more than one font
'NB: Processing Characters takes longer than Words!
For Each w In s.TextFrame.TextRange.Words
Select Case w.Font.Name
Case "Good Font 1", "Good Font 2", "Good Font 3" ', ... etc
' do nothing
Case "Bad Font 1"
w.Font.Name = "Good Font 1"
Case "Bad Font 2"
w.Font.Name = "Good Font 2"
Case "Bad Font 3"
w.Font.Name = "Good Font 3"
Case Else
' User can exit loop by entering a nonsensical 0 or 1 char font
myFont = InputBox("'" + w + "' in '" + s.TextFrame.TextRange + "'", "Enter Font or 0-1 Chars to Exit", w.Font.Name)
If Len(Trim(myFont)) < 2 Then
Exit Sub
Else
w.Font.Name = myFont
End If
End Select
Next w
End If
Next s
Next eachSlide

End Sub

Hope that helps :) Sorry if the indentation is lost

vanderMoose said...

Trevor Reynolds,thanks a lot.
I never dealt with Visual Basic macros in PowerPoint.
That helpped.

Anonymous said...

Many people have this same problem -- you try to save your PowerPoint presentation with embedded fonts and it errors. Or, when trying to use the REPLACE FONTS feature, but you can't replace UNICODE fonts. (Example: cannot replace ARIAL UNICODE MS font.)

Here is a simple macro I wrote that will allow you to change the FONTS to another font. It changes only the selected font and does not affect any other font characteristics.

To use: Create a new PowerPoint macro and paste in the following code. Then run the macro.

*******************************************************

[COPY THE MACRO CODE BELOW]
'-------------------------------------------------------------------------------
Sub Replace_UNICODE_Fonts()
'Written by Mark Wager -- This macro will replace a user-selected font with a font of
'your choice. It will affect only the selected font on the selected slide(s)
'(use single slide view or "Slide Sorter" view)

' Macro written 5/12/2009 by Mark Wager
'
' ---------------------------------------
' Ask User for the problem font and what to change it to
' ---------------------------------------
problemFont = InputBox("Enter the name of the FONT you wish to replace", "Font to Replace", "Arial Unicode MS")
If problemFont = "" Then End
theNewFont = InputBox("Enter the new FONT name.", "New Font", "Arial")
If theNewFont = "" Then theNewFont = "Arial"

' ---------------------------------------
' begins at 1st selected slide and loops through all selected slides
' ---------------------------------------
For Each Slide In ActiveWindow.Selection.SlideRange

' For each text box and shape on the slide...
For Each shp In Slide.Shapes
' If a text box or shape has text in it...
If shp.HasTextFrame Then
Set txtRng = shp.TextFrame.TextRange
'Now, sift through all characters on the slide
For i = 1 To txtRng.Characters.Count
' Only change the user-selected font, leave rest alone
If txtRng.Characters(i, 1).Font.Name = problemFont Then
txtRng.Characters(i, 1).Font.Name = theNewFont
End If
Next i
End If
Next
Next Slide
End Sub
'-------------------------------------------------------------------------------
'[COPY ENTIRE MACRO ABOVE -- END OF MACRO]

(Sorry about the formatting... it gets lost when posting)