|
Sub pptcopy()
FilePath = Application.ActivePresentation.Path
MyName = Dir(FilePath & "*.pp*", vbDirectory)
Do While MyName <> ""
If MyName <> ActivePresentation.Name Then
Set ppt = ActivePresentation
'本ppt最后新建一个空白幻灯片
'Set newSlide = ppt.Slides.Add(.Slides.Count + 1, ppLayoutBlank)
Set pptInput = Presentations.Open(FilePath & "" & MyName)
For i = 1 To pptInput.Slides.Count
pptInput.Slides(i).Copy '合并至最后
ppt.Slides.Paste (ppt.Slides.Count + 1)
Next
pptInput.Close: ppt.Save
End If
MyName = Dir
Loop
End Sub |
|