きれいに取得する方法が見つからなかったので、無理やり作ってみました。
VBA
1Function TableCells(tbl As Table) As Collection
2
3 Dim dic 'As New Scripting.Dictionary
4 Set dic = CreateObject("Scripting.Dictionary")
5
6 Set dic("1 1") = tbl.Rows(1).Cells(1)
7
8 Dim i, j, c
9 For i = 1 To tbl.Rows.Count
10 For j = 1 To tbl.Columns.Count
11 c = i & " " & j
12 If tbl.Rows(i).Cells(j).Selected = False Then
13 Set dic(c) = tbl.Rows(i).Cells(j)
14 End If
15 tbl.Rows(i).Cells(j).Select
16 Next j, i
17
18 For j = 1 To tbl.Columns.Count
19 For i = 1 To tbl.Rows.Count
20 c = i & " " & j
21 If dic.Exists(c) And tbl.Rows(i).Cells(j).Selected Then
22 dic.Remove i & " " & j
23 End If
24 tbl.Rows(i).Cells(j).Select
25 Next i, j
26
27 Set TableCells = New Collection
28 For Each c In dic
29 TableCells.Add dic(c), c
30 Next
31
32End Function
VBA
1Sub sample()
2
3 Dim shp As Shape
4 Set shp = ActivePresentation.Slides(1).Shapes(1)
5 Dim tbl As Table
6 Set tbl = shp.Table
7
8 Dim coll As Collection
9 Set coll = TableCells(tbl)
10
11 Debug.Print coll.Count
12
13 Dim c As Cell
14 For Each c In coll
15 Debug.Print c.Shape.TextFrame2.TextRange.Text
16 Next
17
18End Sub
<追記>
Excelから呼び出すのも同じ感じで行けると思います。
ただ、以下はPowerPointが既に起動している前提で書いているので、
そうでない場合はもう一工夫いるのかもしれません。
VBA
1Sub ExcelVBASample()
2
3 Dim ppap As PowerPoint.Application
4 Set ppap = GetObject(, "Powerpoint.Application")
5
6 Dim shp As PowerPoint.Shape
7 Set shp = ppap.ActivePresentation.Slides(1).Shapes(1)
8
9 Dim tbl As PowerPoint.Table
10 Set tbl = shp.Table
11
12 Dim coll As Collection
13 Set coll = TableCells(tbl)
14
15 Debug.Print coll.Count
16
17 Dim c As Cell
18 For Each c In coll
19 Debug.Print c.Shape.TextFrame2.TextRange.Text
20 Next
21
22End Sub
23