I have created a PowerPoint template that has certain shapes, tables, etc,
that I modify based on data in an Excel workbook. My macro reads the data
from Excel, and updates information in a table, changes the color of some
shapes, and updates a chart.
I refer to the PowerPoint objects by names I have assigned them (such as
"StatusTable1"). The problem I am having is that when I update certain parts
of the PowerPoint table, PowerPoint changes the name of the table from
"StatusTable1" back to something like "Group 454", so I lose track of the
name of the object. The ID is also changed. Why does PowerPoint change the
name of the object? Is there a work around, something that references the
object that doesn't change?
Thanks,
Eric
-----------------------
If toast always lands butter-side down, and cats always land on their feet,
what happens if you strap toast on the back of a cat and drop it?
Steven Wright (1955 - )
Chirag - 29 Oct 2005 02:41 GMT
PowerPoint assigns new names when new shapes are created. Are you seeing
that PowerPoint is changing the names for existing shapes, when you don't
create the new shapes?
- Chirag
PowerShow - View multiple PowerPoint slide shows simultaneously
http://officeone.mvps.org/powershow/powershow.html
>I have created a PowerPoint template that has certain shapes, tables, etc,
> that I modify based on data in an Excel workbook. My macro reads the data
[quoted text clipped - 19 lines]
> what happens if you strap toast on the back of a cat and drop it?
> Steven Wright (1955 - )
Steve Rindsberg - 29 Oct 2005 05:08 GMT
> I have created a PowerPoint template that has certain shapes, tables, etc,
> that I modify based on data in an Excel workbook. My macro reads the data
[quoted text clipped - 8 lines]
> name of the object? Is there a work around, something that references the
> object that doesn't change?
ISTR that this is a peculiarity specific to tables. A couple guesses at
workarounds:
Ungroup the table then regroup it. I don't think the group name should change.
when you manipulate it ( though if you ungroup it, it will ).
Another approach would be to tag the shape
Call oShp.Tags.Add("MyShape","Yes")
Then when you need to find it, iterate through all the shapes on the slide and
find the one with oShp.Tags("MyShape") = "Yes"
> -----------------------
> If toast always lands butter-side down, and cats always land on their feet,
> what happens if you strap toast on the back of a cat and drop it?
> Steven Wright (1955 - )
Schroedinger wouldn't tell Heisenberg. He's not about to tell us either.
He just mumbles stuff about "Physicist, heal thyself" then wanders off to sit on
a hot stove and watch girls.
egun - 31 Oct 2005 14:39 GMT
Thanks to both of you for answering. Yes, it changes the name of the
existing object - the table. Steve, I will try your suggestion. It is a
small table, so I may just use a bunch of individual text boxes instead.
-----------------------
If toast always lands butter-side down, and cats always land on their feet,
what happen if you strap toast on the back of a cat and drop it?
Steven Wright (1955 - )
> > I have created a PowerPoint template that has certain shapes, tables, etc,
> > that I modify based on data in an Excel workbook. My macro reads the data
[quoted text clipped - 30 lines]
> He just mumbles stuff about "Physicist, heal thyself" then wanders off to sit on
> a hot stove and watch girls.
Steve Rindsberg - 31 Oct 2005 17:15 GMT
> Thanks to both of you for answering. Yes, it changes the name of the
> existing object - the table. Steve, I will try your suggestion. It is a
> small table, so I may just use a bunch of individual text boxes instead.
To save time, use a table then ungroup it. That'll give you your individual text
boxes and save you all the trouble of lining 'em up manually.
> -----------------------
> If toast always lands butter-side down, and cats always land on their feet,
[quoted text clipped - 35 lines]
> > He just mumbles stuff about "Physicist, heal thyself" then wanders off to sit on
> > a hot stove and watch girls.
-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================