• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Code to identify if there is any table in the slide and get the name of it if exist

kaushik03

Member
Hi all,

I am working on a project where in I am automating the process of updating the ppt from excel (looping through slides and updating text in the shapes, underlying chart data, table etc).

Let me give you a bit of background before getting into the real problem:

1)I am copying excel data range and pasting it in the slide as a table, which I am able to get it work properly.

2)Each time I am deleting the existing table and pasting the data range as a new table.

3)during this course of action, MS PPT, creates a new name for the data range being pasted as a table in the slide (e.g; earlier say it was table 12, now its table 13), which can be seen in the selection pane

Now, where I am stuck is:

I need to check IF the slide contains any table THEN get the table name and store it in a variable.(so that later I can refer to the right shape and delete it before pasting the new one)

As of now what I have tried is :if shp.hastable then shp.name (where shp as shape, and at this step the right slide is also selected).

I have seen few example in the net but not able to get it working.

Could some one of you please write the code, test it and share with me!

Regards,
Kaushik
 
Back
Top