How to remove texts/pictures from masterslide?


#1

Dear Support,

I want to remove customized texts/pictures in the masterslides based on VB.net and aspose.slides.dll, How to achieve it?
Input and output demo file for your reference. Test.zip (139.1 KB)

Thanks for your help!

Ducaisoft


#2

@ducaisoft,

We are working on this issue and will get back to you with feedback soon.


#3

I may work it out like this:
For cc = 0 To 20
Dim ss As Integer = PPT.Masters(cc).Slide.Shapes.Count
For kk = ss - 1 To 0 Step -1
Dim sp As Global.Aspose.Slides.IShape
sp = PPT.Masters(cc).Slide.Shapes(kk)
Dim a = sp.AlternativeText
Dim b = sp.AsIPresentationComponent
Dim d = sp.Name
If (a <> “” Or a = “” And InStr(d.ToLower, “textbox”) > 0) And InStr(d.ToLower, “placeholder”) = 0 Then PPT.Masters(cc).Slide.Shapes.RemoveAt(kk)
Next
Next

This codes could remove customized metas in the masterslides.


#4

@ducaisoft,

Can you please confirm if your issue has been resolved.


#5

Yes! This code can do it!
Thanks!


#6

@ducaisoft,

You are very welcome.