回答編集履歴
2
訂正、追記
answer
CHANGED
@@ -6,11 +6,11 @@
|
|
6
6
|
MsgBox item.Categories.CategoryID
|
7
7
|
End Sub
|
8
8
|
```
|
9
|
-
何が表示されるか試してください。
|
9
|
+
~~何が表示されるか試してください。~~
|
10
10
|
|
11
11
|
|
12
|
-
標準モジュールに記入できるなら
|
12
|
+
~~標準モジュールに記入できるなら~~
|
13
|
-
選択しているアイテムに対して確認できます。
|
13
|
+
~~選択しているアイテムに対して確認できます。~~
|
14
14
|
```
|
15
15
|
Sub tes()
|
16
16
|
|
@@ -29,4 +29,37 @@
|
|
29
29
|
End If
|
30
30
|
|
31
31
|
End Sub
|
32
|
+
```
|
33
|
+
訂正します
|
34
|
+
CategoriesのなかのItemでした。
|
35
|
+
objCategory.Nameと objCategory.CategoryID
|
36
|
+
```
|
37
|
+
Sub tes2()
|
38
|
+
|
39
|
+
Dim ml As Variant
|
40
|
+
Dim ins As Inspector
|
41
|
+
Set ins = ActiveInspector
|
42
|
+
Dim A_Exp As Explorer
|
43
|
+
Dim objCategory As Category
|
44
|
+
|
45
|
+
If TypeName(ActiveWindow) = "Explorer" Then
|
46
|
+
|
47
|
+
Set A_Exp = ActiveExplorer
|
48
|
+
Set ml = A_Exp.Selection(1)
|
49
|
+
If A_Exp.Categories.Count > 0 Then
|
50
|
+
|
51
|
+
' Enumerate the Categories collection.
|
52
|
+
For Each objCategory In A_Exp.Categories
|
53
|
+
|
54
|
+
' Add the name and ID of the Category object to
|
55
|
+
' the output string.
|
56
|
+
strOutput = strOutput & objCategory.Name & _
|
57
|
+
": " & objCategory.CategoryID & vbCrLf
|
58
|
+
Next
|
59
|
+
End If
|
60
|
+
|
61
|
+
End If
|
62
|
+
|
63
|
+
End Sub
|
64
|
+
|
32
65
|
```
|
1
追記
answer
CHANGED
@@ -1,6 +1,9 @@
|
|
1
|
+
私の環境ではテストできないのですが。
|
2
|
+
|
1
3
|
```
|
2
4
|
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
|
3
|
-
MsgBox item.Categories
|
5
|
+
MsgBox item.Categories.Name
|
6
|
+
MsgBox item.Categories.CategoryID
|
4
7
|
End Sub
|
5
8
|
```
|
6
9
|
何が表示されるか試してください。
|
@@ -10,7 +13,7 @@
|
|
10
13
|
選択しているアイテムに対して確認できます。
|
11
14
|
```
|
12
15
|
Sub tes()
|
13
|
-
|
16
|
+
|
14
17
|
Dim ml As Variant
|
15
18
|
Dim ins As Inspector
|
16
19
|
Set ins = ActiveInspector
|
@@ -20,7 +23,8 @@
|
|
20
23
|
|
21
24
|
Set A_Exp = ActiveExplorer
|
22
25
|
Set ml = A_Exp.Selection(1)
|
23
|
-
MsgBox ml.Categories
|
26
|
+
MsgBox ml.Categories.Name
|
27
|
+
MsgBox ml.Categories.CategoryID
|
24
28
|
|
25
29
|
End If
|
26
30
|
|