Formating lost while programmatically pasting slides from multiple presentations into a single presentation using C# Interop RRS feed

  • Question

  • Hi
    I am trying to paste multiple slides from a different PPTs  in an existing PPT.
    I could paste multiple slides but issue is formating of slides is not preserved.
    my code is as follows

    Presentation pres = pptApp.Presentations.Open("Original.pptx", MsoTriState.msoFalse, MsoTriState.msoFalse, MsoTriState.msoFalse);
                        int counter = 1;
    //slideNumbers is a list of slide numbers or position at which we are going to insert the slide in original file
                        foreach (var number in slideNumbers)
                            if (pres != null)
                                pres.Slides.InsertFromFile("temp.pptx", number- 1, counter, counter);                         
                    if (pres != null)

     I need solution in c#.
    Thank you !

    • Edited by Swapnil Shevade Tuesday, September 13, 2016 10:32 AM
    • Moved by DotNet Wang Wednesday, September 21, 2016 4:35 AM not related to WPF
    Tuesday, September 13, 2016 10:08 AM

All replies