PDA

View Full Version : Add a file to the end of a presentation



db1966
07-30-2008, 07:52 AM
I'm trying to add a seperate ppt file to the end of a presentation. I can add it after a page:-

Sub AddEndPage()
ActivePresentation.Slides.InsertFromFile _
"C:\Data\KPI's\End Page.ppt", 1, 1
End Sub

The problem is the active file could contain varying numbers of pages, so rather than saying "put this after this page" I want to say "put this at the end.

Cosmo
07-30-2008, 09:40 AM
the end of the document will be
ActivePresentation.Slides.Count
so try this:

Sub AddEndPage()
ActivePresentation.Slides.InsertFromFile _
"C:\Data\KPI's\End Page.ppt", ActivePresentation.Slides.Count, 1
End Sub