none
Taging PowerPoint Placeholders? RRS feed

  • Question

  • I am working in PowerPoint 2007.

    I would like to be able to mark placeholders in a layout so that when the layout is applied to a new slide, the placeholder(s) have the same marker.

    I have tried using a Tag on the ShapeRange for the placeholder in the layout. When the new placeholder is created from the template in the layout, the Tags collection has 0 items.

    I have tried using the Name property of the ShapeRange in the same fashion. When the new placeholder is created, it has a new name of "Text Placeholder N"where N is a new number in sequence.

    Is there any way to flag these objects short of putting a string into the TextFrame.TextRange ?

    Tuesday, January 3, 2012 10:29 PM

All replies

  • Hello William,

    What do you mean about " flag these objects short of putting a string into the TextFrame.TextRange"? I don't understand the "flag".

    Best Wishes

     

     

    Monday, January 9, 2012 7:56 AM
  • The term flag is used here to mean: set some property to allow a procedure to identify each shape.

    To Clarify:

    I Manually added a placeholder to a template.

    I opened the Visual Basic editor.

    With the placeholder selected in the slide master, I used the immediate window to add a Tag named "FID" with a value of "A".

    ActiveWindow.Selection.ShapeRange.Tags.Add "FID", "A"

     

    I Added the object to the Watches and saw the Tags.Count was equal to 1.

    Again in the immediate window I typed:

    ? ActiveWindow.Selection.ShapeRange.Tags("FID")

    and it returned

    A

     

    So Now, I have a Slide Master with a Placeholder that has a Tag named "FID" that has a value of "A"

     

    I Closed the Master View.

     

    I added a slide to the presentation that uses the Layout I defined in the steps above.

     

    The new slide has a shape patterned after the Placeholder. It has the same format as the placeholder in the master. It even has the same tabs in the paragraph settings.

     

    What it does not have is the Tag named "FID".

    The watch showed the Tags.Count equal to 0.

    In the immediate window:

    ? ActiveWindow.Selection.ShapeRange.Tags("FID")

    returned nothing.

     

    If PowerPoint is instantiating a new shape based on the Placeholder shape type in the Master Slide, why is it not passing the Tags property along to each instance?

    Monday, January 9, 2012 9:30 PM