Sub パワーポイントPPTのページ数を取得する() Set パワポ指定 = CreateObject("PowerPoint.Application").ActivePresentation スライド枚数 = パワポ指定.Slides.Count MsgBox "スライド枚数:" & スライド枚数 End Sub