回答編集履歴
2
追記
test
CHANGED
@@ -111,3 +111,65 @@
|
|
111
111
|
End Sub
|
112
112
|
|
113
113
|
```
|
114
|
+
|
115
|
+
---
|
116
|
+
|
117
|
+
<追記>
|
118
|
+
|
119
|
+
Excelから呼び出すのも同じ感じで行けると思います。
|
120
|
+
|
121
|
+
ただ、以下はPowerPointが既に起動している前提で書いているので、
|
122
|
+
|
123
|
+
そうでない場合はもう一工夫いるのかもしれません。
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
```VBA
|
128
|
+
|
129
|
+
Sub ExcelVBASample()
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
Dim ppap As PowerPoint.Application
|
134
|
+
|
135
|
+
Set ppap = GetObject(, "Powerpoint.Application")
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
Dim shp As PowerPoint.Shape
|
140
|
+
|
141
|
+
Set shp = ppap.ActivePresentation.Slides(1).Shapes(1)
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
Dim tbl As PowerPoint.Table
|
146
|
+
|
147
|
+
Set tbl = shp.Table
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
Dim coll As Collection
|
152
|
+
|
153
|
+
Set coll = TableCells(tbl)
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
Debug.Print coll.Count
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
Dim c As Cell
|
162
|
+
|
163
|
+
For Each c In coll
|
164
|
+
|
165
|
+
Debug.Print c.Shape.TextFrame2.TextRange.Text
|
166
|
+
|
167
|
+
Next
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
End Sub
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
```
|
1
修正
test
CHANGED
@@ -16,7 +16,7 @@
|
|
16
16
|
|
17
17
|
|
18
18
|
|
19
|
-
dic("1 1") =
|
19
|
+
Set dic("1 1") = tbl.Rows(1).Cells(1)
|
20
20
|
|
21
21
|
|
22
22
|
|