Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6575055
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:20:25+00:00 2026-05-25T15:20:25+00:00

I want to mark an item with a particular category, based on the text

  • 0

I want to mark an item with a particular category, based on the text within the item.

I have the following code.

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

I select the folder and then run the macro, but it won’t mark the category.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T15:20:25+00:00Added an answer on May 25, 2026 at 3:20 pm

    You need to .Save your item after you update the category. Below is your For loop with the save. As a side note, keep in mind that you’ll be overwriting any existing categories as .Categories is a comma-delimited string. You may want to test if .Categories is empty and, if not, add “, Important”.

    For Each objItem In objList
        If (InStr(objItem.Body, "(WA)") > 0) Then
            objItem.Categories = "Important"
            objItem.Save
            If (InStr(objItem.Categories, "Important") > 0) Then
                iCount = iCount + 1
            End If
        End If
    Next
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If I want to mark the second item I'm doing the following code: This
my problem is: I have an image and want to mark some areas over
Suppose you have a module that you know is safe. You want to mark
I have a item in a listView control like this <asp:Label ID=Label2 runat=server Text='<%#Eval(Open)
I've my mark up as <input id=field type=text /> <ul> <li class=item><a href=#>one</a></li> <li
I have a load of hierarchal static configuration data that I want to read,
I have code like below: <div id=container> <div class=item id=1>blah blah</div> <div class=item id=2>blah
I want to nest an ordered list within a single unordered list item, such
I want to style/mark a MenuItem in GWT MenuBar. So i have some logic
I want to mark all maxima along a given axis of an array (which

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.