Problem cloning PPTX slides

Last post 09-08-2009, 10:14 AM by BrightStar. 5 replies.
Sort Posts: Previous Next
  •  07-27-2009, 8:36 AM 190482

    Problem cloning PPTX slides .NET

    Attachment: Present (inaccessible)
    I have problems cloning some PPTX slides.  The error message is "Oject reference not set to an instance of an object".  I do not have problems cloning simple slides with just text, bullet points, etc.  However when the slides are more complicated, for example, with graphs, the program would run into this problem.  I am attaching two sample presentations.  The program has no problem cloning the first three slides.  It would fail on the last slide.  I suspect it has something to do with the nature of the last slide.  The program can complete successfully if I change the loop to stop cloning before the last slide.

    The test program is I use is shown below:

        Public Sub CloneSlideEx()
            Dim srcPres As PresentationEx = New PresentationEx("../../Original.ForAspose1.pptx")
            Dim targetPres As PresentationEx = New PresentationEx("../../out.pptx")
            For i As Integer = 0 To srcPres.Slides.Count - 1
                Dim srcSlide As SlideEx = srcPres.Slides(i)
                Dim srcSlideMaster As MasterSlideEx = srcSlide.LayoutSlide.MasterSlide
                Dim index As Integer = targetPres.Masters.AddClone(srcSlideMaster)
                Dim targetSlideMaster As MasterSlideEx = targetPres.Masters(index)
                targetPres.Slides.AddClone(srcSlide, targetSlideMaster)
            Next
            targetPres.Write("../../Output/output.pptx")
        End Sub

     
  •  07-27-2009, 11:02 AM 190521 in reply to 190482

    Re: Problem cloning PPTX slides

    Thank you for the example. We will investigate it and fix.

    Alexey Zhilin
    Team Leader
    Aspose Tyumen Team
    About Us
    Contact Us
     
  •  07-27-2009, 11:12 AM 190522 in reply to 190521

    Re: Problem cloning PPTX slides

    Thank you for the quick response.  I gather you have already found the sample slides I provided in a separate posting.
     
  •  09-08-2009, 8:04 AM 197081 in reply to 190482

    Re: Problem cloning PPTX slides .NET

    Any update on this problem?
     
  •  09-08-2009, 9:28 AM 197099 in reply to 197081

    Re: Problem cloning PPTX slides

    Hi BrightStar,

    Your code and slides are working fine on my end. Please download the latest version here and test it.


    Muhammad Sabir
    Support Assistant Manager
    Aspose Sialkot Team
    http://www.aspose.com
    Aspose - Your File Format Experts

    Keep in touch! We're on Twitter and Facebook
     
  •  09-08-2009, 10:14 AM 197114 in reply to 197099

    Re: Problem cloning PPTX slides

    Yes.  I do see the latest version 3.1.1.7 does fix the problem.  Thanks a lot.
     
View as RSS news feed in XML