Speaking of PowerPoint, you should use a VBA macro to do the job, something like
Sub Pull() Dim SrcDir As String, SrcFile As String SrcDir = PickDir() If SrcDir = "" Then Exit Sub SrcFile = Dir(SrcDir & "\*.ppt") Do While SrcFile <> "" ImportFromPPT SrcDir + "\" + SrcFile, 1, 2 SrcFile = Dir() Loop End Sub
When choosing the source directory, you can use this function
Private Function PickDir() As String Dim FD As FileDialog PickDir = "" Set FD = Application.FileDialog(msoFileDialogFolderPicker) With FD .Title = "Pick a directory to work on" .AllowMultiSelect = False .Show If .SelectedItems.Count <> 0 Then PickDir = .SelectedItems(1) End If End With End Function
Now - the main thing - to insert slides from another PPT, and save the original format . This is a tricky thing, since the PPT VBA InsertFromFile method makes no sense. Microsoft gave us a good time to deal with this in countless 20-hour debugging sessions :-), and you need to enter a lot of code to get everything right - much more complicated than using a dialogue manually, in particular if your original slide is rejected from the slide of the main source.
If your PPT adheres to its wizards, you can safely omit all code between "→ →"
Private Sub ImportFromPPT(FileName As String, SlideFrom As Long, SlideTo As Long) Dim SrcPPT As Presentation, SrcSld As Slide, Idx As Long, SldCnt As Long Set SrcPPT = Presentations.Open(FileName, , , msoFalse) SldCnt = SrcPPT.Slides.Count If SlideFrom > SldCnt Then Exit Sub If SlideTo > SldCnt Then SlideTo = SldCnt For Idx = SlideFrom To SlideTo Step 1 Set SrcSld = SrcPPT.Slides(Idx) SrcSld.Copy With ActivePresentation.Slides.Paste .Design = SrcSld.Design .ColorScheme = SrcSld.ColorScheme ' if slide is not following its master (design, color scheme) ' we must collect all bits & pieces from the slide itself ' >>>>>>>>>>>>>>>>>>>> If SrcSld.FollowMasterBackground = False Then .FollowMasterBackground = False .Background.Fill.Visible = SrcSld.Background.Fill.Visible .Background.Fill.ForeColor = SrcSld.Background.Fill.ForeColor .Background.Fill.BackColor = SrcSld.Background.Fill.BackColor ' inspect the FillType object Select Case SrcSld.Background.Fill.Type Case Is = msoFillTextured Select Case SrcSld.Background.Fill.TextureType Case Is = msoTexturePreset .Background.Fill.PresetTextured (SrcSld.Background.Fill.PresetTexture) Case Is = msoTextureUserDefined ' TextureName gives a filename w/o path ' not implemented, see picture handling End Select Case Is = msoFillSolid .Background.Fill.Transparency = 0
Only read-only or password-protected are not scanned in the code, and they will be corrupted. Also be careful not to run the collector file itself. Otherwise, it should work. I must admit that for a long time I did not look at the code ,-)