I have seen a post like this before but could not add more comments and could not implement the solution. So please do not criticize :) I basically need to open an empty pptx file and give a location of a folder that consists lets say 20 other pptx presentations (text, graphs, images) and add those (automatically) into the opened file. All of the VBA I have tried so far is not working for me so please put comments if you can provide a VBA sample for amateurs like me!
Much appreciated!
As advised by one of the masters here, here is the code I used and replaced the strFPath with the folder I included all the pptx files that I wanted to be inserted into the MASTER presentation pptx file and replaced the strSpec with one of the files from the folder I placed the other files so that it gets inserted but no luck of it working.
Sub Combine_fromFolder()
Dim strFPath As String
Dim strSpec As String
Dim strFileName As String
Dim oTarget As Presentation
Set oTarget = Application.Presentations.Add(WithWindow:=True)
strFPath = "C:\Users\John\Desktop\Test\" ' Edit this
strSpec = "*.PPTX" 'to include PPT etc use "*.PP*"
strFileName = Dir$(strFPath & strSpec)
While strFileName <> ""
oTarget.Slides.InsertFromFile strFileName, oTarget.Slides.Count, 1, 1
strFileName = Dir()
Wend
End Sub