3
votes

Recently I was working with a code to open a PowerPoint presentation (by vb.net) object and process each slide by slide. If processing slide is not null or a master slide I need to skip and go to the next one.

Can anyone show me how to check whether a given slide is a master slide? Is there any way to check it by slide type?

Public Sub CheckForProprtychecker(ByVal Presn As PowerPoint.Presentation)

For SlideIndex As Integer = 1 To Presn.Slides.Count()
      If Presn.Slides(SlideIndex) Is Nothing Then
         Continue For
      End If
     ''# do other process  
Next

End Sub 
2

2 Answers

3
votes

I don't think it's that easy unfortunately. I once wrote an Office interop application in which we had to replace tags on the page (there were also tags in the Masterpage that had to be replaced as well).

When looping through the slides, I found that

For each Slide there's a

slide.Master

and there's

slide.Design.SlideMaster

So my guess is that each slide contains the template within itself (speculation).

1
votes

None of your slides are the master slide - they are all either built-in or customized layouts of one (of possibly more) master slides. Do you want to know what layout it is?