会社のパワポのひな形に入っているマクロ
たまにマクロが消えていたりするのでバックアップとしてメモ
Const DEFAULT_DIVIDER As String = "/" '仕切り文字
Const SCALEDOWN_RATE As Single = 0.6 'x/Yの Y文字大きさ
Sub 総スライド挿入()
Dim sld As Slide
Dim shp As Shape
For Each sld In ActivePresentation.Slides
sld.DisplayMasterShapes = True
For Each shp In sld.Shapes
If Left(shp.Name, 12) = "Slide Number" Then
Set TextRange = shp.TextFrame.TextRange
TextRange.Text = sld.SlideNumber & DEFAULT_DIVIDER & ActivePresentation.Slides.Count
Set charactersRange = TextRange.Characters(InStr(TextRange, DEFAULT_DIVIDER), TextRange.Characters.Count)
charactersRange.Font.Bold = False
charactersRange.Font.Size = TextRange.Font.Size * SCALEDOWN_RATE
End If
Next
Next
End Sub


![CET リアルタイム集計・分析基盤 構成メモ[NOINDEX]](https://www.yuulinux.tokyo/contents/wp-content/uploads/2017/11/plan_20181101_0-150x150.png)