スライド番号は出せるのに・・・ という、ネタ自体はよくある話。
最初はPowerPointのVBAマクロで作り始めたけど、
それより外出ししてVBScriptにしたほうが扱いやすいかなと思い、軌道修正。
スライドのページを追加・削除したら、最後に自分でこのスクリプトを走らせる感じで使っています。
位置や文字色やサイズは自分の環境にあわせて適当に変えてください。
InsertTotalNumberOfPagesToSlideMaster
Sub InsertTotalNumberOfPagesToSlideMaster()
Const TNOP= "TotalNumberOfPages"
Set PPAP = GetObject(, "PowerPoint.Application").ActivePresentation
With PPAP.SlideMaster
For Each shp In .Shapes
If shp.Name = TNOP Then Exit For
Next
If IsEmpty(shp) Then Set shp = .Shapes.AddTextbox(1, 0, 0, 10, 10)
shp.Name = TNOP
shp.TextFrame.TextRange.Text = "/" & PPAP.Slides.Count - 1
End With
With shp.TextFrame
.WordWrap = 0
.AutoSize = 1
.MarginRight = 0
With .TextRange.Font
.Size = 9
.Name = "Meiryo UI"
End With
End With
With shp
.Left = .Parent.Width - .Width
.Top = .Parent.Height - .Height
End With
End Sub