Powerpoint 2007 renames shape names on slide

G

Guest

I create POTs that contained named shapes. I access these shapes by name in
an application. However, I have noticed that when I insert a slide from a POT
that PowerPoint 2007 renames the shapes and therefore my program cannot
identify the shapes. This has not happened with earlier versions of
PowerPoint. Any ideas or suggestions would be appreciated.
 
S

Steve Rindsberg

Gfrank1157 said:
I create POTs that contained named shapes. I access these shapes by name in
an application. However, I have noticed that when I insert a slide from a POT
that PowerPoint 2007 renames the shapes and therefore my program cannot
identify the shapes. This has not happened with earlier versions of
PowerPoint. Any ideas or suggestions would be appreciated.

I'll report this if I get a few minutes to spare. It's a bug, clearly. To help
isolate it:

Does it happen when you insert from a regular PPT file instead?
Does it happen when you open the POT, copy the slide you want and paste that
into the target presentation?
 
G

Guest

Steve Rindsberg said:
I'll report this if I get a few minutes to spare. It's a bug, clearly. To help
isolate it:

Does it happen when you insert from a regular PPT file instead?
Does it happen when you open the POT, copy the slide you want and paste that
into the target presentation?

-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
The following piece of VBA code will produce the problem. The code opens a
POT that was created in PowerPoint 2003 and inserts a slide from it into the
active presentation. The code then proceeds to print out the name of the
shapes on the inserted slide. The names are NOT the same as in the POT.
Thanks for your reply.

Public Sub InsertSlide()
Dim potName As String
potName = "OPStdColDataLbl.pot"
ActivePresentation.Slides.InsertFromFile potName, 1
ActivePresentation.Slides(2).Select
ShowSlideShapes
End Sub
Public Sub ShowSlideShapes()
Dim aSlide As Slide
Dim objShape As Shape
Dim aString As String
Set aSlide = ActiveWindow.View.Slide
aString = ""
For Each objShape In aSlide.Shapes
aString = aString & objShape.Name & vbCrLf
Next objShape
MsgBox aString
Set aSlide = Nothing
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top