RSS feed inbox "new item event"?

Status
Not open for further replies.
A

Accessor

Hi all. I've been working with access and excel vba for a couple years, and

I'm just about to try and get my feet wet in outlook. I subscribe to several

RSS feeds, and get dozens of messages on each a day. A couple of the feeds

are of more interest than the rest. What I'd like to do is, if a new feed

comes in from a service of interest, trigger a form. I'd like the form to

display in controls the subject line seperate from the body. If it's a point

of interest, I'll have an "add to database" button which will write a record

to my access database. If I can get as far as displaying the item on the

form, I can probably figure out the rest.

Can I get a nudge in the right direction? At the moment I can't seem to find

more than how to work with my standard inbox in a relatively basic fashion.

Many thanks in advance.
 
You will need to process the RSS folder with the Folder.Items.ItemAdd event;

see http://www.outlookcode.com/article.aspx?id=62 for an example. To return a

non-default folder, you need to walk the folder hierarchy using the Folders

collections or use a function that does that for you. For examples, see:

http://www.outlookcode.com/codedetail.aspx?id=628 - uses a folder path string

http://www.outlookcode.com/codedetail.aspx?id=492 - searches for a folder by

name

The object browser will show you the names of standard properties you can

use to populate your VBA userform with information from the item.

Sue Mosher

"Accessor" wrote:


> Hi all. I've been working with access and excel vba for a couple years, and
> I'm just about to try and get my feet wet in outlook. I subscribe to several
> RSS feeds, and get dozens of messages on each a day. A couple of the feeds
> are of more interest than the rest. What I'd like to do is, if a new feed
> comes in from a service of interest, trigger a form. I'd like the form to
> display in controls the subject line seperate from the body. If it's a point
> of interest, I'll have an "add to database" button which will write a record
> to my access database. If I can get as far as displaying the item on the
> form, I can probably figure out the rest.

> Can I get a nudge in the right direction? At the moment I can't seem to find
> more than how to work with my standard inbox in a relatively basic fashion.
> Many thanks in advance.
 
Hi Sue, thanks for the reply. I was just earlier today looking at you site

thinking how I need to pick up a copy of your book. :) So being a total

greenhorn, this is what I have thus far, my attempts based on your links

provided, not yet working:

Option Explicit

Private WithEvents olRSSItems As Items

Private Sub Application_Startup()

Dim objNS As NameSpace

Set objNS = Application.Session

' instantiate objects declared WithEvents

Set olRSSItems = objNS.GetFolderByName("Option Monster Trader's News").Items

Set objNS = Nothing

End Sub

Private Sub olRSSItems_ItemAdd(ByVal Item As Object)

On Error Resume Next

Item.BodyFormat = olFormatPlain

Item.Save

Set Item = Nothing

End Sub

Am I in the ballpark? Apparently I'm trying to use the function incorrectly,

I thought the purpose was to pass a folder in code when just knowing it's

name... thanks again.

"Sue Mosher [MVP]" wrote:


> You will need to process the RSS folder with the Folder.Items.ItemAdd event;
> see http://www.outlookcode.com/article.aspx?id=62 for an example. To return a
> non-default folder, you need to walk the folder hierarchy using the Folders
> collections or use a function that does that for you. For examples, see:

> http://www.outlookcode.com/codedetail.aspx?id=628 - uses a folder path string
> http://www.outlookcode.com/codedetail.aspx?id=492 - searches for a folder by
> name

> The object browser will show you the names of standard properties you can
> use to populate your VBA userform with information from the item.
> > Sue Mosher
> > >

> "Accessor" wrote:
>
> > Hi all. I've been working with access and excel vba for a couple years, and
> > I'm just about to try and get my feet wet in outlook. I subscribe to several
> > RSS feeds, and get dozens of messages on each a day. A couple of the feeds
> > are of more interest than the rest. What I'd like to do is, if a new feed
> > comes in from a service of interest, trigger a form. I'd like the form to
> > display in controls the subject line seperate from the body. If it's a point
> > of interest, I'll have an "add to database" button which will write a record
> > to my access database. If I can get as far as displaying the item on the
> > form, I can probably figure out the rest.
> > Can I get a nudge in the right direction? At the moment I can't seem to find
> > more than how to work with my standard inbox in a relatively basic fashion.
> > Many thanks in advance.
 
You'd need to add the GetFolderByName function to a code module, too, of

course, but that looks like it's on the right track.

You say it's not yet working, but what specifically does that mean? Are you

getting errors?

Sue Mosher

"Accessor" <Accessor> wrote in message

news:B6827802-B547-4BFC-985D-77E215778CF4@microsoft.com...
> Hi Sue, thanks for the reply. I was just earlier today looking at you site
> thinking how I need to pick up a copy of your book. :) So being a total
> greenhorn, this is what I have thus far, my attempts based on your links
> provided, not yet working:

> Option Explicit

> Private WithEvents olRSSItems As Items

> Private Sub Application_Startup()
> Dim objNS As NameSpace
> Set objNS = Application.Session
> ' instantiate objects declared WithEvents
> Set olRSSItems = objNS.GetFolderByName("Option Monster Trader's
> News").Items
> Set objNS = Nothing
> End Sub

> Private Sub olRSSItems_ItemAdd(ByVal Item As Object)
> On Error Resume Next
> Item.BodyFormat = olFormatPlain
> Item.Save
> Set Item = Nothing
> End Sub

> Am I in the ballpark? Apparently I'm trying to use the function
> incorrectly,
> I thought the purpose was to pass a folder in code when just knowing it's
> name... thanks again.

> "Sue Mosher [MVP]" wrote:
>
> > You will need to process the RSS folder with the Folder.Items.ItemAdd
> > event;
> > see http://www.outlookcode.com/article.aspx?id=62 for an example. To
> > return a
> > non-default folder, you need to walk the folder hierarchy using the
> > Folders
> > collections or use a function that does that for you. For examples, see:
>

>> http://www.outlookcode.com/codedetail.aspx?id=628 - uses a folder path
> > string
> > http://www.outlookcode.com/codedetail.aspx?id=492 - searches for a folder
> > by
> > name
>

>> The object browser will show you the names of standard properties you can
> > use to populate your VBA userform with information from the item.
>

>> "Accessor" wrote:
> >
> > > Hi all. I've been working with access and excel vba for a couple years,
> > > and
> > > I'm just about to try and get my feet wet in outlook. I subscribe to
> > > several
> > > RSS feeds, and get dozens of messages on each a day. A couple of the
> > > feeds
> > > are of more interest than the rest. What I'd like to do is, if a new
> > > feed
> > > comes in from a service of interest, trigger a form. I'd like the form
> > > to
> > > display in controls the subject line seperate from the body. If it's a
> > > point
> > > of interest, I'll have an "add to database" button which will write a
> > > record
> > > to my access database. If I can get as far as displaying the item on
> > > the
> > > form, I can probably figure out the rest.
> >> > Can I get a nudge in the right direction? At the moment I can't seem to
> > > find
> > > more than how to work with my standard inbox in a relatively basic
> > > fashion.
> > > Many thanks in advance.
 
Hey there.

I did add that function to a module, yup. I'm trying to not ask to be too

"spoon fed" here, but when I F5 it, I get the error "object doesn't support

this property or method" on the line "Set olRSSItems"

"Sue Mosher [MVP]" wrote:


> You'd need to add the GetFolderByName function to a code module, too, of
> course, but that looks like it's on the right track.

> You say it's not yet working, but what specifically does that mean? Are you
> getting errors?

> > Sue Mosher
> > >

> "Accessor" <Accessor> wrote in message
> news:B6827802-B547-4BFC-985D-77E215778CF4@microsoft.com...
> > Hi Sue, thanks for the reply. I was just earlier today looking at you site
> > thinking how I need to pick up a copy of your book. :) So being a total
> > greenhorn, this is what I have thus far, my attempts based on your links
> > provided, not yet working:
> > Option Explicit
> > Private WithEvents olRSSItems As Items
> > Private Sub Application_Startup()
> > Dim objNS As NameSpace
> > Set objNS = Application.Session
> > ' instantiate objects declared WithEvents
> > Set olRSSItems = objNS.GetFolderByName("Option Monster Trader's
> > News").Items
> > Set objNS = Nothing
> > End Sub
> > Private Sub olRSSItems_ItemAdd(ByVal Item As Object)
> > On Error Resume Next
> > Item.BodyFormat = olFormatPlain
> > Item.Save
> > Set Item = Nothing
> > End Sub
> > Am I in the ballpark? Apparently I'm trying to use the function
> > incorrectly,
> > I thought the purpose was to pass a folder in code when just knowing it's
> > name... thanks again.
> > "Sue Mosher [MVP]" wrote:
> >
> >> You will need to process the RSS folder with the Folder.Items.ItemAdd
> >> event;
> >> see http://www.outlookcode.com/article.aspx?id=62 for an example. To
> >> return a
> >> non-default folder, you need to walk the folder hierarchy using the
> >> Folders
> >> collections or use a function that does that for you. For examples, see:
> >
> >> http://www.outlookcode.com/codedetail.aspx?id=628 - uses a folder path
> >> string
> >> http://www.outlookcode.com/codedetail.aspx?id=492 - searches for a folder
> >> by
> >> name
> >
> >> The object browser will show you the names of standard properties you can
> >> use to populate your VBA userform with information from the item.
> >
> >> "Accessor" wrote:
> >
> >> > Hi all. I've been working with access and excel vba for a couple years,
> >> > and
> >> > I'm just about to try and get my feet wet in outlook. I subscribe to
> >> > several
> >> > RSS feeds, and get dozens of messages on each a day. A couple of the
> >> > feeds
> >> > are of more interest than the rest. What I'd like to do is, if a new
> >> > feed
> >> > comes in from a service of interest, trigger a form. I'd like the form
> >> > to
> >> > display in controls the subject line seperate from the body. If it's a
> >> > point
> >> > of interest, I'll have an "add to database" button which will write a
> >> > record
> >> > to my access database. If I can get as far as displaying the item on
> >> > the
> >> > form, I can probably figure out the rest.
> >> >> > Can I get a nudge in the right direction? At the moment I can't seem to
> >> > find
> >> > more than how to work with my standard inbox in a relatively basic
> >> > fashion.
> >> > Many thanks in advance.


>
 
Sorry I missed this the first time: GetFolderByName is a custom function,

not a method of the Namespace object, so the proper usage would be:

Set olRSSFolder = GetFolderByName("Option Monster Trader's News")

If Not olRSSFolder Is Nothing Then

Set olRSSItems = olRSSFolder.Items

Else

MsgBox "folder not found"

End If

Note how you should get the folder first, test for its existence, then move

on to the Items collection.

Sue Mosher

"Accessor" <Accessor> wrote in message

news:C9AE7DEB-21D9-470D-B3C6-37F66B64ACFA@microsoft.com...
> Hey there.

> I did add that function to a module, yup. I'm trying to not ask to be too
> "spoon fed" here, but when I F5 it, I get the error "object doesn't
> support
> this property or method" on the line "Set olRSSItems"

> "Sue Mosher [MVP]" wrote:
>
> > You'd need to add the GetFolderByName function to a code module, too, of
> > course, but that looks like it's on the right track.
>

>> You say it's not yet working, but what specifically does that mean? Are
> > you
> > getting errors?
>

>> "Accessor" <Accessor> wrote in message
> > news:B6827802-B547-4BFC-985D-77E215778CF4@microsoft.com...
> > > Hi Sue, thanks for the reply. I was just earlier today looking at you
> > > site
> > > thinking how I need to pick up a copy of your book. :) So being a total
> > > greenhorn, this is what I have thus far, my attempts based on your
> > > links
> > > provided, not yet working:
> >> > Option Explicit
> >> > Private WithEvents olRSSItems As Items
> >> > Private Sub Application_Startup()
> > > Dim objNS As NameSpace
> > > Set objNS = Application.Session
> > > ' instantiate objects declared WithEvents
> > > Set olRSSItems = objNS.GetFolderByName("Option Monster Trader's
> > > News").Items
> > > Set objNS = Nothing
> > > End Sub
> >> > Private Sub olRSSItems_ItemAdd(ByVal Item As Object)
> > > On Error Resume Next
> > > Item.BodyFormat = olFormatPlain
> > > Item.Save
> > > Set Item = Nothing
> > > End Sub
> >> > Am I in the ballpark? Apparently I'm trying to use the function
> > > incorrectly,
> > > I thought the purpose was to pass a folder in code when just knowing
> > > it's
> > > name... thanks again.
> >> > "Sue Mosher [MVP]" wrote:
> >> >> You will need to process the RSS folder with the Folder.Items.ItemAdd
> > >> event;
> > >> see http://www.outlookcode.com/article.aspx?id=62 for an example. To
> > >> return a
> > >> non-default folder, you need to walk the folder hierarchy using the
> > >> Folders
> > >> collections or use a function that does that for you. For examples,
> > >> see:
> > >
>> >> http://www.outlookcode.com/codedetail.aspx?id=628 - uses a folder path
> > >> string
> > >> http://www.outlookcode.com/codedetail.aspx?id=492 - searches for a
> > >> folder
> > >> by
> > >> name
> > >
>> >> The object browser will show you the names of standard properties you
> > >> can
> > >> use to populate your VBA userform with information from the item.
> > >
>> >> "Accessor" wrote:
> > >
>> >> > Hi all. I've been working with access and excel vba for a couple
> > >> > years,
> > >> > and
> > >> > I'm just about to try and get my feet wet in outlook. I subscribe to
> > >> > several
> > >> > RSS feeds, and get dozens of messages on each a day. A couple of the
> > >> > feeds
> > >> > are of more interest than the rest. What I'd like to do is, if a new
> > >> > feed
> > >> > comes in from a service of interest, trigger a form. I'd like the
> > >> > form
> > >> > to
> > >> > display in controls the subject line seperate from the body. If it's
> > >> > a
> > >> > point
> > >> > of interest, I'll have an "add to database" button which will write
> > >> > a
> > >> > record
> > >> > to my access database. If I can get as far as displaying the item on
> > >> > the
> > >> > form, I can probably figure out the rest.
> > >>> >> > Can I get a nudge in the right direction? At the moment I can't seem
> > >> > to
> > >> > find
> > >> > more than how to work with my standard inbox in a relatively basic
> > >> > fashion.
> > >> > Many thanks in advance.

>

>
>>
 
That seems to have done the trick. I knew better as well. Funny, when you're

just a little bit out of your element (new VBA objects) some skills that

should be ingrained can slip. You're the best!

"Sue Mosher [MVP]" wrote:


> Sorry I missed this the first time: GetFolderByName is a custom function,
> not a method of the Namespace object, so the proper usage would be:

> Set olRSSFolder = GetFolderByName("Option Monster Trader's News")
> If Not olRSSFolder Is Nothing Then
> Set olRSSItems = olRSSFolder.Items
> Else
> MsgBox "folder not found"
> End If

> Note how you should get the folder first, test for its existence, then move
> on to the Items collection.
> > Sue Mosher
> > >

> "Accessor" <Accessor> wrote in message
> news:C9AE7DEB-21D9-470D-B3C6-37F66B64ACFA@microsoft.com...
> > Hey there.
> > I did add that function to a module, yup. I'm trying to not ask to be too
> > "spoon fed" here, but when I F5 it, I get the error "object doesn't
> > support
> > this property or method" on the line "Set olRSSItems"
> > "Sue Mosher [MVP]" wrote:
> >
> >> You'd need to add the GetFolderByName function to a code module, too, of
> >> course, but that looks like it's on the right track.
> >
> >> You say it's not yet working, but what specifically does that mean? Are
> >> you
> >> getting errors?
> >
> >> "Accessor" <Accessor> wrote in message
> >> news:B6827802-B547-4BFC-985D-77E215778CF4@microsoft.com...
> >> > Hi Sue, thanks for the reply. I was just earlier today looking at you
> >> > site
> >> > thinking how I need to pick up a copy of your book. :) So being a total
> >> > greenhorn, this is what I have thus far, my attempts based on your
> >> > links
> >> > provided, not yet working:
> >> >> > Option Explicit
> >> >> > Private WithEvents olRSSItems As Items
> >> >> > Private Sub Application_Startup()
> >> > Dim objNS As NameSpace
> >> > Set objNS = Application.Session
> >> > ' instantiate objects declared WithEvents
> >> > Set olRSSItems = objNS.GetFolderByName("Option Monster Trader's
> >> > News").Items
> >> > Set objNS = Nothing
> >> > End Sub
> >> >> > Private Sub olRSSItems_ItemAdd(ByVal Item As Object)
> >> > On Error Resume Next
> >> > Item.BodyFormat = olFormatPlain
> >> > Item.Save
> >> > Set Item = Nothing
> >> > End Sub
> >> >> > Am I in the ballpark? Apparently I'm trying to use the function
> >> > incorrectly,
> >> > I thought the purpose was to pass a folder in code when just knowing
> >> > it's
> >> > name... thanks again.
> >> >> > "Sue Mosher [MVP]" wrote:
> >> >> >> You will need to process the RSS folder with the Folder.Items.ItemAdd
> >> >> event;
> >> >> see http://www.outlookcode.com/article.aspx?id=62 for an example. To
> >> >> return a
> >> >> non-default folder, you need to walk the folder hierarchy using the
> >> >> Folders
> >> >> collections or use a function that does that for you. For examples,
> >> >> see:
> >> >
> >> >> http://www.outlookcode.com/codedetail.aspx?id=628 - uses a folder path
> >> >> string
> >> >> http://www.outlookcode.com/codedetail.aspx?id=492 - searches for a
> >> >> folder
> >> >> by
> >> >> name
> >> >
> >> >> The object browser will show you the names of standard properties you
> >> >> can
> >> >> use to populate your VBA userform with information from the item.
> >> >
> >> >> "Accessor" wrote:
> >> >
> >> >> > Hi all. I've been working with access and excel vba for a couple
> >> >> > years,
> >> >> > and
> >> >> > I'm just about to try and get my feet wet in outlook. I subscribe to
> >> >> > several
> >> >> > RSS feeds, and get dozens of messages on each a day. A couple of the
> >> >> > feeds
> >> >> > are of more interest than the rest. What I'd like to do is, if a new
> >> >> > feed
> >> >> > comes in from a service of interest, trigger a form. I'd like the
> >> >> > form
> >> >> > to
> >> >> > display in controls the subject line seperate from the body. If it's
> >> >> > a
> >> >> > point
> >> >> > of interest, I'll have an "add to database" button which will write
> >> >> > a
> >> >> > record
> >> >> > to my access database. If I can get as far as displaying the item on
> >> >> > the
> >> >> > form, I can probably figure out the rest.
> >> >> >> >> > Can I get a nudge in the right direction? At the moment I can't seem
> >> >> > to
> >> >> > find
> >> >> > more than how to work with my standard inbox in a relatively basic
> >> >> > fashion.
> >> >> > Many thanks in advance.
> >
> >
> >>


>
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
M Creating an RSS Feed **FROM** Outlook 2013 Calendar. Using Outlook 5
Flavia Lovell Can Not Subscribing the RSS Feed of Elance Jobs Using Outlook 3
V Exporting RSS Feed to OPML file Using Outlook 8
Jennifer Murphy Sync RSS feed message after Safe Mode Using Outlook 3
Commodore Importing RSS on another computer (and feed locations) Using Outlook 8
F Outlook Re-Downloading RSS Feed Posts Days Later Using Outlook 3
IGWright Outlook 2010 RSS Feed Folder Issue Using Outlook.com accounts in Outlook 6
D MailItem from an RSS feed Outlook VBA and Custom Forms 2
S Receiving duplicate messages from RSS feeds Using Outlook 3
Diane Poremsky How to Change the Font used for Outlook's RSS Feeds Using Outlook 0
Diane Poremsky How to Remove RSS Support from Outlook Using Outlook 0
norbertlars Outlook 2016 - rss Using Outlook 3
N Going Forward: Using Outlook 2016 for RSS Feeds Using Outlook 2
O How to delete duplicate RSS messages? Using Outlook 6
Horsepower Duplicate RSS feeds Using Outlook 5
E RSS export as OPML problem Using Outlook 4
Commodore Repeated RSS items downloads Using Outlook 1
Jay Freedman RSS feeds don't get any messages Using Outlook 4
Commodore Deleting folders or feeds when deleting from default RSS Feeds structure? Using Outlook 7
Commodore Why some RSS feeds stop getting updates? Using Outlook 12
Commodore Outlook 2007 not closing network connections with RSS feeds Using Outlook 1
billzant RSS feeds and google Using Outlook 2
T Permanent Removal of RSS feeds folder amd Search folder in Outlook 2010 Using Outlook 10
Commodore RSS feeds from sites that require login Using Outlook 5
B How to add RSS feeds for Microsoft Newsgroups Outlook VBA and Custom Forms 3
J Time Zone Issues - Outlook Calendar and Webcal Feed Using Outlook 8
B Linkedin activity feed not visible Using Outlook 8
F Outlook 365 Group INBOX by date but not by date and time Using Outlook 1
T Outlook 2010 Sub accounts not showing new emails in Inbox Using Outlook 4
F Color code certain INBOX emails Using Outlook 2
K vba code to auto download email into a specific folder in local hard disk as and when any new email arrives in Inbox/subfolder Outlook VBA and Custom Forms 0
J Outlook 365 Forward Email Subject to my inbox when new email arrive in shared inbox Using Outlook 0
P "Item could not be moved" message occurs frequently for IMAP inbox, Office 365 Using Outlook 0
D Gmail mail is being delivered to a different email inbox in Outlook App 2021 Using Outlook 2
S Format Inbox Using Outlook 0
J How to create a drop down user defined field that will appear on an inbox view Outlook VBA and Custom Forms 8
P Emails assigned with a certain category (within a shared inbox) to be copied to a specific folder. Outlook VBA and Custom Forms 2
O Moving "tasks" to inbox in Outlook 2016 Using Outlook 1
A Imap account not auto syncing inbox at startup Using Outlook 0
S Outlook 2016 dont delete inbox item Using Outlook 0
F Jump to Inbox folder when click on Favorite Using Outlook 8
R Moved 6 months worth (approx 1500 emails) lost from moving from TPG inbox to Icloud inbox (folders) Using Outlook 3
S Problem Checking the available stores in my Inbox (Outlook VBA) Outlook VBA and Custom Forms 0
S Outlook VBA How to adapt this code for using in a different Mail Inbox Outlook VBA and Custom Forms 0
A Inbox didn't got read Outlook VBA and Custom Forms 0
A Unflag Inbox and Flag Inbox with Orange Category After Item is send Outlook VBA and Custom Forms 3
glnz O365 - How to combine the Inboxes for four email accounts into a single Inbox Using Outlook 7
S Macro to move “Re:” & “FWD:” email recieved the shared inbox to a subfolder in outlook Outlook VBA and Custom Forms 0
S Outlook Macro to send auto acknowledge mail only to new mails received to a specific shared inbox Outlook VBA and Custom Forms 0
G Inbox shows old email Using Outlook 3

Similar threads

Back
Top