none
PowerPoint: Images not found after joining multiple PPTX to one RRS feed

  • Question

  • We are using a code block which worked fine in PowerPoint 2007 and 2010:

            public static PPT.Presentation AddPresentation(PPT.Application appl, bool withWindow)
            {
                PPT.Presentation presentation = appl.Presentations.Add(ConversionUtils.BoolToTriState(withWindow));
                return presentation;
            }
    
            public static void AppendSlidesFromFile(PPT.Presentation presentation, String fileName, int slideStart, int slideEnd)
            {
                if (presentation == null) return;
    
                try
                {
                    int index = presentation.Slides.Count;
                    int i = presentation.Slides.InsertFromFile(fileName.Replace("/", "\\"), index, slideStart, slideEnd);
                    if (i == 1)
                    {
                        index = presentation.Slides.Count;
                        PPT.Slide slide = presentation.Slides[index];
                    }
                }
                catch (Exception e)
                {
                }
            }
    

    In PowerPoint 2013 (highest patch level, verified on 2013 Professional and 2013 Professional Plus) this still joins our PPTX into one, however, all the images embedded in the single PPTX files are merely shown as frames or image objects, saying that the image cannot be found.

    No exceptions are being thrown in the process.

    Is there any fix or workaround available for this?

    Regards,

    Michael

    Tuesday, March 31, 2015 9:57 AM

Answers

  • Hi,

    I have used the above code you provided to merge ppts into one, but I can't reproduce the issue. In my ppt, images of different format, png, jpg, bmp,gif, all could  work. My PowerPoint is Office 2013 Professional Plus 2013. What's the format of the image you have inserted into your ppt ?Have you update your PowerPoint? will it happen when you insert an image manually in your PowerPoint 2013 ?

    Best Regards

    Lan


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by L.HlModerator Wednesday, April 8, 2015 1:59 AM
    Wednesday, April 1, 2015 10:06 AM
    Moderator

All replies

  • Hello Michael,

    What are the actual arguments passed to the method?


    Tuesday, March 31, 2015 11:52 AM
  • Hi Eugene,

    we just debugged it and these are our example values when running it:

    PPT.Presentation presentation = appl.Presentations.Open("c:\template.pptx", MSO.MsoTriState.msoTrue, MSO.MsoTriState.msoTrue, MSO.MsoTriState.msoTrue);
    while (presentation.Slides.Count > 0)
    {
                    PPT.Slide slide = presentation.Slides[1];
                    slide.Delete();
    }
    
    int index = presentation.Slides.Count;
    presentation.Slides.InsertFromFile("c:\page1.pptx", index, 1, -1);
    
    index = presentation.Slides.Count;
    presentation.Slides.InsertFromFile("c:\page2.pptx", index, 1, -1);
    
    index = presentation.Slides.Count;
    presentation.Slides.InsertFromFile("c:\page3.pptx", index, 1, -1);
    

    Thanks for the quick response!

    Regards, Michael

    Tuesday, March 31, 2015 1:18 PM
  • Hi,

    I have used the above code you provided to merge ppts into one, but I can't reproduce the issue. In my ppt, images of different format, png, jpg, bmp,gif, all could  work. My PowerPoint is Office 2013 Professional Plus 2013. What's the format of the image you have inserted into your ppt ?Have you update your PowerPoint? will it happen when you insert an image manually in your PowerPoint 2013 ?

    Best Regards

    Lan


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by L.HlModerator Wednesday, April 8, 2015 1:59 AM
    Wednesday, April 1, 2015 10:06 AM
    Moderator