菜单

Merge pptx

2011年03月27日 - windows

Using VBA programming languag.

Private Sub UserForm_Click()
Dim path As String
Dim inputFileName As String
Dim outputFileName As String
Dim slideNum As Integer
path = “e:\ppt”
outputFileName = “output.pptx”
Set pptApp = New PowerPoint.Application
pptApp.Visible = msoTrue
Set pptOutput = pptApp.Presentations.Open(path & “\” & outputFileName)
If pptOutput.Slides.Count = 0 Then
Set newSlide = pptOutput.Slides.Add(1, ppLayoutBlank)
End If
FileNames = Array(“1_seiten.pptx”, “2_seiten.pptx”)

For k = 0 To 1
FileName = path & “\” & FileNames(k)

Debug.Print FileName
Set pptInput = pptApp.Presentations.Open(FileName)
For j = 1 To pptInput.Slides.Count
pptInput.Slides(j).Copy
pptOutput.Slides.Paste (pptOutput.Slides.Count)
Next j
pptInput.Close
pptOutput.Save
Next k
pptOutput.Close
End Sub

发表评论

电子邮件地址不会被公开。 必填项已用*标注