B
Bourgui
Hi all,
I have a weird problem in a Powerpoint macro: certain shapes cannot be
selected by their name, only by their index (and I have verified the name is
correct).
So for example, if the first shape on the first slide is called "Rectangle
1", trying to assign:
Set myShape = ActivePresentation.Slides(1).Shapes("Rectangle 1")
will not work, instead I get an error stating "The item with the specified
name wasn't found"
Just to make sure it isn't a spelling problem (even though I don't actually
type the name, I use variables that store them), I tried something like:
MsgBox
ActivePresentation.Slides(1).Shapes(ActivePresentation.Slides(1).Shapes(1).Name).Name
and got the same error!
It only happens rarely, the shapes are not necessarily of the same type. If
it can help, all the ones I have encountererd so far are placeholders.
I am not the creator of the presentations, so I don't know if anything
special has been done to them (I don't notice anything particular).
If needed I can provide a sample file.
Thanks for your help.
Bourgui
I have a weird problem in a Powerpoint macro: certain shapes cannot be
selected by their name, only by their index (and I have verified the name is
correct).
So for example, if the first shape on the first slide is called "Rectangle
1", trying to assign:
Set myShape = ActivePresentation.Slides(1).Shapes("Rectangle 1")
will not work, instead I get an error stating "The item with the specified
name wasn't found"
Just to make sure it isn't a spelling problem (even though I don't actually
type the name, I use variables that store them), I tried something like:
MsgBox
ActivePresentation.Slides(1).Shapes(ActivePresentation.Slides(1).Shapes(1).Name).Name
and got the same error!
It only happens rarely, the shapes are not necessarily of the same type. If
it can help, all the ones I have encountererd so far are placeholders.
I am not the creator of the presentations, so I don't know if anything
special has been done to them (I don't notice anything particular).
If needed I can provide a sample file.
Thanks for your help.
Bourgui