Take the 2-minute tour ×

I'm using the code below to start a presentation in C#:

    var app = new Microsoft.Office.Interop.PowerPoint.Application();
    var pres = app.Presentations;            
    Presentation objPres = pres.Open(@"C:\test.pptx", MsoTriState.msoTrue, MsoTriState.msoTrue);

How can I start the presentation from a custom start index? Let's say the 4th slide.

How can I start the presentation with a custom window size (standard is fullscreen)? Please check the image below - with these settings the presentation is started in a window. How can I set these values through the interops?

Powerpoint Settings

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

This is how you'd do it in VBA. It should be simple enough to adapt to .Net. It's just a matter of setting a few properties before invoking the .Run method.

Sub Example()

    With ActivePresentation.SlideShowSettings

        ' display a range of slides:
        .RangeType = ppShowSlideRange

        ' Start with slide 5
        .StartingSlide = 5

        ' Specify the ending slide or as here,
        ' have it run to the end of the presentation:
        .EndingSlide = ActivePresentation.Slides.Count

        ' window, not fullscreen/kiosk:
        .ShowType = ppShowTypeWindow

        ' and show it:

    End With

End Sub
share|improve this answer
add comment

Your Answer


