powerpointoffice-interop

How can I determine if a msoPlaceholder is a picture?


I have a case (PowerPoint COM API) where Shape.Type == msoPlaceholder. The shape is a picture. How can I verify that it is a picture?


Solution

  • You can use ContainedType

    e.g. for a msoChart

    oplc.PlaceholderFormat.ContainedType = msoChart (will return True / False)
    

    Per the docs here https://learn.microsoft.com/en-us/office/vba/api/powerpoint.placeholderformat.containedtype