Hi everyone
Below macro works a treat (very customisable) to update slides with different fonts/size instead of following master template. BUT I can't find VBA that PowerPoint recognises for AllCaps? I want to add the AllCaps for the first placeholderFormat.Type = 3
A new exercise - swapped over to PowerPoint.
Anyone have a line for Allcaps = True because that does not work for me in below code in 2010. Many thanks everyone.
Sub PPTChangeAll()
Dim osld As Slide, oshp As Shape
For Each osld In ActivePresentation.Slides
For Each oshp In osld.Shapes
If oshp.Type = msoPlaceholder Then
'Title text change values as required
If oshp.PlaceholderFormat.Type = 1 Or oshp.PlaceholderFormat.Type = 3 Then
If oshp.HasTextFrame Then
If oshp.TextFrame.HasText Then
With oshp.TextFrame.TextRange.Font
.Name = "Arial"
.Size = 36
.Color.RGB = RGB(0, 0, 255)
.Bold = msoFalse
.Italic = msoFalse
.Allcaps = True 'This does not work?
.Shadow = False
End With
End If
End If
End If
If oshp.PlaceholderFormat.Type = 2 Or oshp.PlaceholderFormat.Type = 7 Then
If oshp.HasTextFrame Then
If oshp.TextFrame.HasText Then
'Body text change values as required
With oshp.TextFrame.TextRange.Font
.Name = "Arial"
.Size = 24
.Color.RGB = RGB(255, 0, 0)
.Bold = msoFalse
.Italic = msoFalse
.Shadow = False
End With
End If
End If
End If
End If
Next oshp
Next osld
End Sub
PowerPoint 2010/07 Cvt Text AllCaps Type 3
-
- Administrator
- Posts: 78608
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: PowerPoint 2010/07 Cvt Text AllCaps Type 3
PowerPoint 2007 introduced new font formatting such as strikethrough, double strikethrough, small caps, all caps and many underline styles. But unfortunately, there is no support for any of these features in VBA in PowerPoint 2007 or 2010. Microsoft has omitted to add the corresponding properties to the Font object.
Perhaps in the next version of PowerPoint...
Perhaps in the next version of PowerPoint...
Best wishes,
Hans
Hans
-
- Lounger
- Posts: 29
- Joined: 03 Oct 2011, 01:44
Re: PowerPoint 2010/07 Cvt Text AllCaps Type 3
Just my luck Hans. Thank you have a great day.