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!
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!