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

Free Support Forum - aspose.com

Set shape fillcolor

Hi folks,
I am having a problem setting the color of shapes. The code I am using is as follows. I create a thumbnail bitmap which I subsequently paste into a pdf using aspose.pdf. The bitmap works great but I am unable to set the shape color. No matter how I try to set the color it always stays the same.
I attached a sample slide with one orange rectangle shape that I want to manipulate and make white.
Any guidance would be appreciated.

1. Load an existing PowerPoint with multiple slides
Dim sf As New Aspose.Slides.Presentation("myslides.pptx")

2. get the first slide
Dim sld As Aspose.Slides.Slide = sf.Slides(0)

3. iterate through the shapes and set them to white
For Each shp As Aspose.Slides.Shape In sld.Shapes
Select Case shp.FillFormat.FillType
Case Aspose.Slides.FillType.Pattern, Aspose.Slides.FillType.Solid
shp.FillFormat.FillType = Aspose.Slides.FillType.Solid
shp.FillFormat.SolidFillColor.Color = Color.White
End Select

4. get a thumbnail
Dim bmp As Bitmap = sld.GetThumbnail(1.0, 1.0)

Hi Mike,

I have shared a piece of code in text file with you. This will help you to achieve your requirements. Please share feedback with us if there is still an issue.

Best Regards,

Worked great. Thank you!

Hi Mike,

You are very welcome.

Best Regards,