需將上百張照片每張佔一頁插入 PPT?VBA 巨集瞬間搞定:
假設 C:\Pictures 下有 1.jpg 至 100.jpg。
Sub InsertPic()
Dim i As Integer
For i = 1 To ActivePresentation.Slides.Count
ActivePresentation.Slides(i).Select
With ActiveWindow.Selection.SlideRange
.FollowMasterBackground = msoFalse
.Background.Fill.UserPicture "C:\Pictures\" & i & ".jpg"
End With
Next
End Sub
InsertPic →「執行」。100 張圖片瞬間自動填入對應頁面背景,效率極高。