Share via

ppPlaceholderObject

Anonymous
2013-02-15T10:37:22+00:00

You are on a slide with a placeholder and then you insert a chart in that place holder.

Now with code you can inspect the shape type of that placeholder shape. It will indicate a msoPlaceHolder.

Now I want to find out what object type is in that place holder.

I would expect that the shape.placeholderformat.type would say ppplaceholderchart, but it isn't. It shows ppPlaceHolderObject.

How to find out that there is a chart in that placeholder shape?

thx.

Microsoft 365 and Office | PowerPoint | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2013-02-15T13:39:15+00:00

If it was a chart placeholder it would say ppPlaceholderChart but usually charts will be in an Object type placeholder. Just adding a chart does NOT change thetype.

You can test for a chart (assuming oplc is a refn to the placeholder)

EITHER

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

OR

oplc.HasChart (usually returns -1 =True or 0 False)

I would go for the first option.

Was this answer helpful?

0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2013-02-18T09:52:42+00:00

    That first option worked very well. Many thanks for the answer!

    Was this answer helpful?

    0 comments No comments