Renaming a table in Powerpoint

C

Chris

I run a macro that updates a number of excel sheets and updates a Powerpoint
presentation. The code that the macro breaks on is:

With
oPPTApp.ActivePresentation.slides(7).Shapes("Table").Table.cell(i + 1, j)

Basically the table has named itself to something other than "Table" and I'm
wondering how I find out what the table is called, or how to rename the table
to "Table".

Does this make sense? If so, help would be so much appreciated :)

Thanks,

Chris
 
D

David Marcovitz

I suspect that your macro either recreates the table entirely or
ungroups and regroups. Thus, it is basically a totally new object and
gets a totally new name. I have code for getting and changing the names
of object that will work on your table. Check out Example 8.7 at:

http://www.PowerfulPowerPoint.com/

However, I suspect you want something more automated than selecting the
table and running a macro. However, exactly how that will work depends a
lot on the details of what you are doing. You might have to cycle
through the shapes on the slide to find which one is of type table. Once
you do that you can either use the pointer to the shape that matched
type table directly or use the pointer to adjust the name. For example
if the pointer is oShp, you can eitehr:

oshp.Table.cell(i + 1, j)

or

oshp.Name = "Table"
 

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