We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Back to the reorder issue

Hi

Updated from version 8 ->14 and the reorder I asked about does not work anymore. Cannot find anything about this in the help nor the forum. Here is the code:

For Each sld As Slide In PPTReport.Slides
sldShpCount = sld.Shapes.Count
For shpIndex = 0 To sldShpCount - 1

Dim img As System.Drawing.Image = chart.GetImage(System.Drawing.Imaging.ImageFormat.Jpeg, New Size(1000 * (width / 800), 800 * (height / 500)))
If Not img Is Nothing Then
Dim imgx As IPPImage = PPTReport.Images.AddImage(img)
'Add Picture Frame with height and width equivalent of Picture
Dim picFrame As IPictureFrame = sld.Shapes.AddPictureFrame(ShapeType.Rectangle, xPos, yPos, width, height, imgx)
sld.Shapes.Reorder(0, shp)
picFrame.LineFormat.FillFormat.FillType = FillType.NoFill
End If

r. BA

Hi BA,


Thanks for your feedback.

I have observed the issue statement shared. Can you please share the source andvgenerated presentation with us so that I may further investigate the issue on my end. Please also share the working sample that I may use directly on my end for expedite investigation.

Many Thanks,

Here sample code in a function called FillPPT which is basically the same as above. The picture is now in front of the table

Hi BA,


I have worked with the sample project shared by you and have observed the issue in the sample code where you are setting the shape order. You are actually setting the shape order of the shape at index 0 in shapes collection for the slide. This is not the index of picture frame that you have just added in your presentation. Please try using following alternate in your code and hopefully thing will work fine. I have also attached the generated presentation for your convenience as well.

'This is wrong
’sld.Shapes.Reorder(0, sld.Shapes(idx))
'This is right
sld.Shapes.Reorder(0, CType(picFrame, IShape))


Please share, if I may help you further in this regard.

Many Thanks,