When you add slides to a presentation based on some of PowerPoint’s built-in Themes, you may find that all titles (headings and/or subheads) scream out in UPPERCASE letters, no matter what you do!
In some cases, this behavior may happen because the chosen font contains only uppercase letters. Alternatively, and more likely, the presentation’s Theme has placeholders set to produce all uppercase (aka capital) letters. The Circuit and Integral themes that come with some versions of PowerPoint are examples of such Themes.
Related Content: Which Themes are Installed within Office Versions?
You can laboriously select the text on each Master and individual Layout in Slide Master view, and then use the Home tab | Font group, and click the Dialog Launcher. Then, in the resultant dialog, remove the checkmark next to All Caps each time.
Would VBA provide an easier and more elegant solution? Steve Rindsberg of PowerPoint FAQ and PPTools believes you can get the job done in less time it took you to read this paragraph! Do note that Steve’s code will not change your text to Sentence case or Title case–it merely removes the automatic UPPERCASE.
First you need to know how you can run VBA scripts in PowerPoint — then use this code. Explore the code a bit though.
Sub FixAllCaps() Dim oDes As Design Dim oLay As CustomLayout Dim oSh As Shape For Each oDes In ActivePresentation.Designs For Each oSh In oDes.SlideMaster.Shapes Call NoAllCaps(oSh) Next For Each oLay In oDes.SlideMaster.CustomLayouts For Each oSh In oLay.Shapes Call NoAllCaps(oSh) Next Next Next End Sub Sub NoAllCaps(ByRef oSh As Shape) With oSh If .HasTextFrame Then If .TextFrame2.HasText Then .TextFrame2.TextRange.Font.Allcaps = False End If End If End With End Sub
Once you have placed this code in the VBA editor, close the window to get back to your PowerPoint window. Before you proceed further, it’s a great idea to save your file — be sure to save as a PowerPoint Macro-Enabled Presentation with the PPTM file extension. If you save as any of the other file formats, PowerPoint will offer to remove the macros, and then, of course, the code to change from UPPERCASE to default case will not work! See our PowerPoint File Formats page to learn about these file formats.
Then open or switch to the presentation with the UPPERCASE text and run the macro. To do that, press the Alt F8 shortcut key. In the Macro dialog box that appears, next to Macro in: choose All open presentations, as shown in the figure below. Click the FixAllCaps Macro name, and then click the Run button.
We tested this code using PowerPoint 2013 for Windows.
You can see the end result in the Figure below. Compare with a Figure of the same slides, earlier on this page, and you will notice that the word, AVOID is still in all uppercase. That’s because the original text was in uppercase and this VBA code does not change any text at all. Rather it removes any automatic UPPERCASE forced onto you!
This VBA code works on all placeholders–even body text in Content placeholders! We tested this code on a presentation that used the Main Event theme that uses UPPERCASE for all body text.
Do note though that this code works only on text placeholders, and leaves text boxes alone. It also does not make any changes to text in shapes, charts, and elsewhere.
Related Content: Text Placeholders vs. Text Boxes in PowerPoint
You May Also Like: Use VBA in PowerPoint, Even if You Can’t Program for Nuts | Create Spirographs in PowerPoint Programmatically | Resources on PowerPoint Programming and VBA
Steve Rindsberg has been associated with PowerPoint since the product originated more than two decades ago — his PowerPoint FAQ site is a treasure trove of PowerPoint information.
When he’s not updating his site, he’s working on his popular PPTools add-ins for PowerPoint. Steve’s also into a lot of print technology related stuff.
See Also: VBA: Change One Shape to Another in PowerPoint
Tagged as: Programming, Snippets, Steve Rindsberg, Text, VBA
Microsoft and the Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.
[…] text at one go? Take a look at some amazing VBA code from PowerPoint MVP Steve Rindsberg, in our PowerPoint VBA: Change UPPERCASE To Normal Case […]