![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#7
|
|||
|
|||
![]()
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, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Accessor" wrote in message ... 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" wrote in message ... 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. ![]() 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. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Why can't I "save an item" (an event) to my calendar for Dec09? | Andregas | Outlook - Calandaring | 1 | May 14th 09 08:37 PM |
RSS feed post being reset as "unread" when they have been read | Alistair Doran | Outlook - General Queries | 1 | May 23rd 08 12:42 AM |
Custom colums for "Inbox", "Contacts", and "Calandar" | rcf | Outlook - Installation | 0 | February 15th 08 10:31 PM |
Set "Received" field for inbox item programmatically | Dhananjay | Outlook and VBA | 5 | October 26th 07 08:16 AM |
Can I create one "master" calendar that other calendars feed into? | SteveB | Outlook - Calandaring | 0 | August 22nd 07 06:06 AM |