回答編集履歴
1
追記
test
CHANGED
@@ -5,3 +5,55 @@
|
|
5
5
|
丁寧にやるなら、Select Case parentShape.Type で分岐。
|
6
6
|
|
7
7
|
乱暴にやるなら、On Error Resume Next で突き進む手もある。
|
8
|
+
|
9
|
+
|
10
|
+
|
11
|
+
```VBA
|
12
|
+
|
13
|
+
Select Case parentShape.Type
|
14
|
+
|
15
|
+
Case msoGroup '6
|
16
|
+
|
17
|
+
'
|
18
|
+
|
19
|
+
'
|
20
|
+
|
21
|
+
'
|
22
|
+
|
23
|
+
Case msoAutoShape '1
|
24
|
+
|
25
|
+
If parentShape.TextFrame2.HasText Then
|
26
|
+
|
27
|
+
text = parentShape.DrawingObject.Characters.text
|
28
|
+
|
29
|
+
End If
|
30
|
+
|
31
|
+
|
32
|
+
|
33
|
+
Case msoTextBox '17
|
34
|
+
|
35
|
+
'
|
36
|
+
|
37
|
+
'
|
38
|
+
|
39
|
+
Case msoComment '4
|
40
|
+
|
41
|
+
'
|
42
|
+
|
43
|
+
'
|
44
|
+
|
45
|
+
Case msoLine '9
|
46
|
+
|
47
|
+
'
|
48
|
+
|
49
|
+
'
|
50
|
+
|
51
|
+
|
52
|
+
|
53
|
+
Case Else
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
End Select
|
58
|
+
|
59
|
+
```
|