jmmckillen
New Member
- Joined
- Jan 9, 2021
- Messages
- 11
- Office Version
- 2016
- Platform
- Windows
I am trying to set the font size on a textbox that I just added to all slides and have run into nothing but trouble. The purpose is to number the slides like so (SLIDE 5 of 25, and so on). Please advise...
Public Sub URSlide_of_Slides()
''' upper left of slide
''' Slide height: 540
''' wSlide width: 960
''' nSlide width: 720
Dim sldHgt As Single, sldWdt As Single
sldHgt = ActivePresentation.PageSetup.SlideHeight
sldWdt = ActivePresentation.PageSetup.SlideWidth
'
Dim mySlide As Slide
For Each mySlide In ActivePresentation.Slides
If frmSliders.CheckBox1.Value = True Then
If mySlide.SlideIndex = 1 Then GoTo nextSlide
End If
With mySlide.Shapes
.AddTextbox(Orientation:=msoTextOrientationHorizontal, _
Left:=sldWdt - 120, Top:=sldHgt - 540, Width:=120, _
Height:=35).TextFrame.TextRange.Text _
= "SLIDE " & CStr(mySlide.SlideIndex) & " of " _
& CStr(ActivePresentation.Slides.Count)
End With
nextSlide:
Next mySlide
'
End Sub
Public Sub URSlide_of_Slides()
''' upper left of slide
''' Slide height: 540
''' wSlide width: 960
''' nSlide width: 720
Dim sldHgt As Single, sldWdt As Single
sldHgt = ActivePresentation.PageSetup.SlideHeight
sldWdt = ActivePresentation.PageSetup.SlideWidth
'
Dim mySlide As Slide
For Each mySlide In ActivePresentation.Slides
If frmSliders.CheckBox1.Value = True Then
If mySlide.SlideIndex = 1 Then GoTo nextSlide
End If
With mySlide.Shapes
.AddTextbox(Orientation:=msoTextOrientationHorizontal, _
Left:=sldWdt - 120, Top:=sldHgt - 540, Width:=120, _
Height:=35).TextFrame.TextRange.Text _
= "SLIDE " & CStr(mySlide.SlideIndex) & " of " _
& CStr(ActivePresentation.Slides.Count)
End With
nextSlide:
Next mySlide
'
End Sub