InsertFromFile Method
Collapse the table of content
Expand the table of content
This documentation is archived and is not being maintained.

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



Show:
© 2016 Microsoft