Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How do I group or reference a powerpoint table from VB

Posted on 2004-08-08
3
Medium Priority
?
231 Views
Last Modified: 2010-05-18
I am creating a powerpoint slide from my application.  At one point I add a table and then want to populate the cells.  I need to know how to name the table, or group it with a name so that I can select it to populate it.  My code looks something like the code below ( this was generated from a macro in powerpoint, so I just need to know how to get the name like "group 142") .

        oSlide.Shapes.AddTable(11, 5, 358, 28, 300, 500)

        oApp.ActiveWindow.Selection.SlideRange.Shapes("Group 142").Select()
        oApp.ActiveWindow.Selection.ShapeRange.GroupItems(Index:=54).TextFrame.TextRange.Characters(Start:=1, Length:=0).Select()

Thanks in advance for your help.
0
Comment
Question by:spmcmorrow
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 4

Accepted Solution

by:
Daniellus83 earned 1050 total points
ID: 11751290
Sir,

Its not very easy to find your table,.. but one way to do it is this:

----------------------------------------------------------------------------------------------------------------------------------
    ActivePresentation.Slides(1).Shapes.AddTable NumRows:=3, NumColumns:=4, Left:=10, Top:=10, Width:=288, Height:=288
 
    With ActivePresentation.Slides(1)
      For sh = 1 To .Shapes.Count
          If .Shapes(sh).HasTable Then
             
              'You can directly edit the found table...
             
              MsgBox (.Shapes(sh).Name) '..or store its name?
             
        End If
      Next
    End With
----------------------------------------------------------------------------------------------------------------------------------

This code now returns a MSGBOX with the name...

If you want to expand this for more slides, just use a for-loop for the sildes(.)


Succes,... Daniël
0
 
LVL 4

Expert Comment

by:Daniellus83
ID: 11797187
Did this last code work out??
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question