Const PPTMERGE_FILE = "PPT_assemblé.pptm" Const PPTMERGE_FOLDER = "D:\DATA\test fusion\FusionPPT" Dim Application Set Application=CreateObject("PowerPoint.Application") Application.Visible = True 'must do this for merge to work Dim first first = True Set fs=CreateObject("Scripting.FileSystemObject") Dim folder Set folder = fs.GetFolder(PPTMERGE_FOLDER) Dim out Dim ff For Each ff in folder.Files 'MsgBox ff.Name f = PPTMERGE_FOLDER + "" + ff.Name If first Then Dim p Set out = Application.Presentations.Open(f) out.SaveAs PPTMERGE_FOLDER + "\.." + PPTMERGE_FILE first = False Else out.Slides.InsertFromFile f, out.Slides.Count End If Next If Not first Then out.Save 'out.SlideShowSettings.Run 'out.Close End If Set folder = Nothing Set out = Nothing Set folder = Nothing 'Application.Quit Set Application = Nothing
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question