'----------------------------------------------------------------- ' 画像の明るさを10パーセントにする(表示中のスライドのみ) '----------------------------------------------------------------- Sub 明るさをプラス10_表示中() Dim sld As Slide Dim shp As Shape Dim cnt As Long ' 表示中のスライドを取得 Set sld = ActiveWindow.View.Slide cnt = 0 ' 1ページ目は変更しない If sld.slideIndex = 1 Then MsgBox "1ページ目は変更対象外です。", vbInformation, "スキップ" Exit Sub End If Dim j As Long For j = 1 To sld.Shapes.Count Set shp = sld.Shapes(j) If shp.Type = msoPicture Or shp.Type = msoLinkedPicture Then shp.PictureFormat.Brightness = 0.55 cnt = cnt + 1 End If Next j MsgBox cnt & " 個の画像の明るさを10%に設定しました。", vbInformation, "完了" End Sub '----------------------------------------------------------------- ' 全ページの画像の明るさを10パーセントにする '----------------------------------------------------------------- Sub 明るさをプラス10_全ページ() Dim prs As Presentation Dim sld As Slide Dim shp As Shape Dim cnt As Long Set prs = ActivePresentation cnt = 0 Dim i As Long, j As Long For i = 2 To prs.Slides.Count ' 1ページ目はスキップ Set sld = prs.Slides(i) For j = 1 To sld.Shapes.Count Set shp = sld.Shapes(j) If shp.Type = msoPicture Or shp.Type = msoLinkedPicture Then shp.PictureFormat.Brightness = 0.55 cnt = cnt + 1 End If Next j Next i MsgBox cnt & " 個の画像の明るさを10%に設定しました。", vbInformation, "完了" End Sub