Partager via


Slides.InsertFromFile Method

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

Namespace:  Microsoft.Office.Interop.PowerPoint
Assembly:  Microsoft.Office.Interop.PowerPoint (in Microsoft.Office.Interop.PowerPoint.dll)

Syntax

'Declaration
Function InsertFromFile ( _
    FileName As String, _
    Index As Integer, _
    SlideStart As Integer, _
    SlideEnd As Integer _
) As Integer
'Usage
Dim instance As Slides
Dim FileName As String
Dim Index As Integer
Dim SlideStart As Integer
Dim SlideEnd As Integer
Dim returnValue As Integer

returnValue = instance.InsertFromFile(FileName, _
    Index, SlideStart, SlideEnd)
int InsertFromFile(
    string FileName,
    int Index,
    int SlideStart,
    int SlideEnd
)

Parameters

  • FileName
    Type: System.String
    The name of the file that contains the slides you want to insert.
  • Index
    Type: System.Int32
    The index number of the Slide object in the specified Slides collection you want to insert the new slides after.
  • SlideStart
    Type: System.Int32
    The index number of the first Slide object in the Slides collection in the file denoted by FileName.
  • SlideEnd
    Type: System.Int32
    The index number of the last Slide object in the Slides collection in the file denoted by FileName.

Return Value

Type: System.Int32

See Also

Reference

Slides Interface

Slides Members

Microsoft.Office.Interop.PowerPoint Namespace