Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to identify a layout placeholder programatically

Posted on 2010-11-16
3
Medium Priority
?
1,145 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
  • 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Introduction I recently received a question about the creation of Computer-Based Training (CBT) that incorporates quizzes in the middle of the lesson. The intent was to keep people engaged in the content, and not to actually track students’ scores.…
Setting the Scene PowerPoint is a creative tool in the right hands but it also includes a much underutilised programming dimension. In this beginner level article, we're going to show you some of some key elements of programming PowerPoint using th…
This video teaches viewers how to fit pictures into slides, crop and remove backgrounds, and alter photos to look more professional.
The viewer will learn how to edit the master slide. They will also learn how to combine multiple themes into one master slide to use them in their presentation.
Suggested Courses

772 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