アイテム内のテキストに基づいて、特定のカテゴリのアイテムをマークしたいと考えています。特定のカテゴリのアイテムにマークを付ける
私は以下のコードを持っています。
Sub ProcessRSS()
' Read RSS items and process the usful ones.
Dim objList As Object
Dim objItem As Object
Dim iCount As Integer
Set objList = Application.ActiveExplorer.CurrentFolder.Items
iCount = 0
For Each objItem In objList
If (InStr(objItem.Body, "(WA)") > 0) Then
objItem.Categories = "Important"
If (InStr(objItem.Categories, "Important") > 0) Then
iCount = iCount + 1
End If
End If
Next
Debug.Print "Marked " & iCount & " RSS Items as important."
End Sub
フォルダを選択してマクロを実行しますが、カテゴリはマークされません。
**重要なカテゴリに**を設定した後、objItem.Categoriesに「重要」が含まれているのはなぜですか? Categoriesプロパティを設定した後に項目数を増やさないのはなぜですか? – JimmyPena