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.
 
S

Sue Mosher [MVP]

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.
 
A

Accessor

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.
 
S

Sue Mosher [MVP]

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.
 
A

Accessor

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.


>
 
S

Sue Mosher [MVP]

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.

>

>
>>
 
A

Accessor

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 New Slipstick.com Articles 0
Diane Poremsky How to Remove RSS Support from Outlook New Slipstick.com Articles 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
J 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
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
C Configuring Inbox columns Using Outlook 2
D Inbox column color coding Using Outlook 2
R Outlook 2010 How do you export 2 email Accounts' 2010 Inbox Files to new computer (2019)? Using Outlook 0
J Collaborative Inbox Using Outlook 1
M Missing emails in Inbox, but are present in webmail Using Outlook 0
R List folders in a combo box + select folder + move emails from inbox to that folder + reply to that email Outlook VBA and Custom Forms 1
H Upon opening Outlook, make my popmail inbox open instead of outlook.com inbox Using Outlook 1
P Outlook Mobile App Doesn't Refresh Inbox Using Outlook 0
H In outlook 365 POP mail Inbox, email takes a long time or never arrives. Using Outlook 1
K No emails in inbox Using Outlook.com accounts in Outlook 1
D Unopened message in inbox deleted and not in deleted items Using Outlook 3
R Exporting recovered Deleted Items outside the Inbox Using Outlook 1
N Focussed Inbox Rules Failing Using Outlook 5
M Inbox not showing to deliver new email to this account Using Outlook 3
mctabish Setting "Reply To" based on inbox Outlook VBA and Custom Forms 2

Similar threads

Top