Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
i have 9 ppt files in a folder, i need a macro to open each ppt files and copy the slides of each ppt files into one new ppt file.(merging all the ppt files slides into one ppt file) |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try something like this
Sub test() Set PPObj = CreateObject("PowerPoint.Application") PPObj.Visible = True a = 1 Set NewPresentation = PPObj.presentations.Add For Each obj In ActiveSheet.OLEObjects If Left(obj.progID, 10) = "PowerPoint" Then a = 1 obj.Activate Set PPApp = obj.Object.Application For Each sld In obj.Object.slides sld.Copy NewPresentation.slides.Paste Next sld End If Next obj End Sub "Ranjit kurian" wrote: Hi i have 9 ppt files in a folder, i need a macro to open each ppt files and copy the slides of each ppt files into one new ppt file.(merging all the ppt files slides into one ppt file) |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Joel
Thanks for the reply, but you hv't understood my query, please find the below example I have saved five ppt files in a folder(path:c:/documents/ppt/) 1)Buss.ppt 2)Age.ppt 3)Amt.ppt 4)Camp.ppt 5)Trip.ppt All the above five .ppt files contains only one slides. I need a macro to go to the above folder and open each .ppt files and copy the slides to a new ppt file (merge the five .ppt files to a single ppt file) "Joel" wrote: Try something like this Sub test() Set PPObj = CreateObject("PowerPoint.Application") PPObj.Visible = True a = 1 Set NewPresentation = PPObj.presentations.Add For Each obj In ActiveSheet.OLEObjects If Left(obj.progID, 10) = "PowerPoint" Then a = 1 obj.Activate Set PPApp = obj.Object.Application For Each sld In obj.Object.slides sld.Copy NewPresentation.slides.Paste Next sld End If Next obj End Sub "Ranjit kurian" wrote: Hi i have 9 ppt files in a folder, i need a macro to open each ppt files and copy the slides of each ppt files into one new ppt file.(merging all the ppt files slides into one ppt file) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
My excel macro recorder no longer shows up when recording macro | Excel Discussion (Misc queries) | |||
My excel macro recorder no longer shows up when recording macro | Excel Discussion (Misc queries) | |||
Need syntax for RUNning a Word macro with an argument, called from an Excel macro | Excel Programming | |||
translate lotus 1-2-3 macro into excel macro using excel 2000 | Excel Programming |