NetOfficeFw / NetOffice

🌌 Create add-ins and automation code for Microsoft Office applications.
MIT License
695 stars 143 forks source link

Retrieve the custom form behind any form #383

Closed kev-is-coding-for-adn closed 3 months ago

kev-is-coding-for-adn commented 1 year ago

Hello,

I have a technical question. We use custom layouts in our PowerPoint documents and use predefined texts in some textframes in these custom layouts. When adding a new slide based on this custom layout, the predefined text is shown as placeholder in our textframe like it should.

My question is: with NetOffice, how can I retrieve the text of the placeholder? I have looked at the different properties in the Shape model but didn't find anything relevant. The only thing I found is "CustomLayout" in the Slide model, which then leads me to the "original" shape containing the "placeholder" text BUT I can't find any link between this "custom shape" and the one on the slide.

Is this possible? Thanks

jozefizso commented 1 year ago

The slide should have a reference to the CustomLayout it was created with: https://learn.microsoft.com/en-us/office/vba/api/powerpoint.slide.customlayout

kev-is-coding-for-adn commented 1 year ago

As I said, yes, I found the CustomLayout from the slide, but what I want is to find the shape in that CustomLayout that corresponds to the shape in my slide.