Simple Macro to import slides from a file
I am trying to import slides from multiple files into a single presentation.
Here is what I have in VB so far - what else do I need - I have minimal skills in this area - but I have to import 28 slides into a single presentation on a weekly basis. It would be easier to rename the files to be consistent and run a macro. Can anyone please help me?
Code:
Sub ImportAgencySlides()
Dim FileName As String
Dim Index, SlideStart, SlideEnd As Long
ActivePresentation.Slides.InsertFromFile("c:\filename1.ppt", 1, 1, 1)
End Sub
When I debug, I get Compile Error: Syntax Error
If I change it (based on MS help sites), to this format:
Code:
ActivePresentation.Slides.InsertFromFile_ "c:\filename1.ppt", 1, 1, 1
I get the following error: Method or Data Member not found
And, the file is in the path and file name described.
I also want to have it import multiple files, what would that sytax be?
Thanks for any and all help!
Kelly
Help needed to import different pp files and store them in a set
Hey,
I really need some support to accomplish what I am trying to do.
This is what I want:
In a macro, I want to specify a folder where all my powerpoint files (hence slides) are located and then import them into the macro script in a set.
So I was thinking a bit in terms of the below, but change the ActivePres... to a set where I can store all the powerpoint files I am importing.
ActivePresentation.Slides.InsertFromFile "C:\*.pptx", Index:=CurrentSlideIndex
Is this possible? And if, how do I do it?
Thanks