Solved

How to identify a layout placeholder programatically

Posted on 2010-11-16
3
1,136 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 100 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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

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

Suggested Solutions

Title # Comments Views Activity
Unlinking an Excel chart copied and pasted into PowerPoint 6 322
Increment Version Number in File Name 3 130
Surpressing messages VBA 9 75
Can't edit data in PowerPoint 2013 6 593
Many programs have tried to outwit PowerPoint in terms of technology and skill. These programs, however, still lack several characteristics that PowerPoint has possessed from the start. Here's why PowerPoint replacements won't entirely work for desi…
Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
This video teaches viewers how to add transitions to their Slideshows and how to set up timing for the transitions.
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.

685 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