Sub test() '獲取所有ppt頁面 For Each currentSlide In ActivePresentation.Slides
'每個頁面加一個文本框
Set Sh = currentSlide.Shapes.AddLabel(msoTextOrientationHorizontal, 80, 30, 150, 100)
Sh.TextFrame.TextRange.Text = "如圖所示:"
Sh.TextFrame.TextRange.Font.Color = RGB(226, 17, 0)
Sh.TextFrame.TextRange.Font.Size = 24
'循環每個頁面
For Each shp In currentSlide.Shapes
'type = 13是圖片 17是文本框
If shp.Type = 13 Then
shp.Top = 100 '設置top位置
shp.Left = 270 '設置left位置
shp.Height = 400 '設置圖片高度位置
'shp.Width = 7
End If
Next shp
Next currentSlide
End Sub
