This topic has not yet been rated - Rate this topic

Slides.InsertFromFile Method

Office 2007
Inserts slides from a file into a presentation, at the specified location. Returns an Integer that represents the number of slides inserted.

Syntax

expression.InsertFromFile(FileName, Index, SlideStart, SlideEnd)

expression   A variable that represents a Slides object.

Parameters

NameRequired/OptionalData TypeDescription
FileNameRequiredStringThe name of the file that contains the slides you want to insert.
IndexRequiredLongThe index number of the Slide object in the specified Slides collection you want to insert the new slides after.
SlideStartOptionalLongThe index number of the first Slide object in the Slides collection in the file denoted by FileName.
SlideEndOptionalLongThe index number of the last Slide object in the Slides collection in the file denoted by FileName.

Return Value
Integer

Example

This example inserts slides three through six from C:\Ppt\Sales.ppt after slide two in the active presentation.

Visual Basic for Applications
ActivePresentation.Slides.InsertFromFile _
    "c:\ppt\sales.ppt", 2, 3, 6



Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
Fails to include images
This method fails in PowerPoint 2007 to bring in images from slides, they are missing in the new presentation.