Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to identify a layout placeholder programatically

Posted on 2010-11-16
3
Medium Priority
?
1,141 Views
Last Modified: 2012-05-10
My addin uses templates contained in particular layouts to set up the content of slides. Layouts contain a number of placeholders. My problem is that I don't know how to identify each of these placeholders on a slide to place the required information in them.

So far I have tried the following approaches:

- Naming the placeholders, and using Placeholders.FindByName: Unfortunately placeholders on slides are renamed, they do not maintain the name used in the layout.
- Using tags: Tags placed on placeholders on the layout are not copied over to the placeholders on the slide, so they can't be used to locate them on slides.
- Placing an identification text on the placeholders and looking for it on the slides: The problem is that text entered in the layout is shown in slides (before modifying it), but is not accesible through the TextFrame.TextRange.Text property.

What else can I try?
0
Comment
Question by:momsoft2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 23

Accepted Solution

by:
JSRWilson earned 300 total points
ID: 34814455
I don't think there;s a good way to do this Placeholders on slides are based on the master but theya re new shapes which is why names tags etc don't match

You could iterate through the placeholders on slide and master (after a reset if necessary) and check Left,Top,Zorder tc and if they match read the name from the master maybe.
0
 

Author Comment

by:momsoft2
ID: 34835441
JSRWilson,

Thank you very much for your answer. I have finally resorted to proceed as you suggest.
0
 

Author Closing Comment

by:momsoft2
ID: 34835468
Unfortunately the solution provided does not solve my original question, but simply provides a workaround. Also, the time ellapsed since I originally asked the question has forced me to find a similar solution by myself.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
The viewer will learn how to edit text. This includes Font, Spacing, Resizing, Color, and other special text options.
The viewer will learn how to  create a slide that will launch other presentations in Microsoft PowerPoint. In the finished slide, each item launches a new PowerPoint presentation and when each is finished it automatically comes back to this slide: …

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question