PDA

View Full Version : Deleting some RSS with a specific word in title



Darthcolo
07-27-2012, 06:29 AM
Hello all, and congratulations for this excellent forum!
I'm totally new to VBA... although I have worked with SH, TCL, C, etc. scripts.

I'm having problems building a script that should be executed when a new RSS arrives to its respective folder. I have an incoming RSS feed which inform me of some events. There are 2 kinds of feeds: the ones that "set" the event (in form of: SET event nš x) and the ones who "clear" the event (in form of: CLEAR event nš x). If the "x" in the event title are the same in both, "set" and "clear" RSS, I need to delete them.

What I have done so far, is to read the title of all the RSS in a particular RSS folder.


Sub test()
Dim item As Object
Dim flRss As Folder
Dim sub_folder As MAPIFolder

Set flRss = Application.GetNamespace("MAPI").GetDefaultFolder(olFolderRssFeeds)
Set sub_folder = flRss.Folders("ALT1040")

For Each item In sub_folder.Items
Debug.Print item.Subject
Next item
End Sub


The logic will be: if there is a "clear" word, search for the same rss title with a "set" word, and then, delete both.

I know about logic, but don't know about VBA. :(

Can you guys help me with this? :bow:

Thanks!

ranme100
07-31-2012, 02:32 AM
like wise...

JP2112
08-06-2012, 07:19 AM
Check out the code posted here:

http://www.vbaexpress.com/forum/showthread.php?t=43136

You simply need to point it to the RSS folder.

ahrefony
08-08-2012, 01:36 AM
I just need these, now I find these things, thank you for sharing. Let me know these things.