2

In Outlook 2013 there is an option to import an OPML file and add all or some selected RSS feeds to the feeds list. This function can be triggered by right-clicking on the "RSS feeds" folder in "Mail" view and selecting "Import an OPML File...". Then an import assistant appears, asking for a file name. In the next step you can select one/several/all feeds found in the file and import them in the last step. I want to automate this list of steps because I am in a situation that certain new feeds (provided by Gitweb) can appear every day.

Furthermore, I want to automate deleting certain feeds.

Can anybody explain how to do this in VBA?

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
kriegaex
  • 63,017
  • 15
  • 111
  • 202

1 Answers1

1

You can

  1. create a new RSS feed programmatically by directly creating a hidden message with the message class of IPM.Sharing.Index.In in the Inbox folder and another hidden message in the target RSS folder (you can see these messages in OutlookSpy (I am its author) if you go to the folder in question, click the IMAPIFolder button on the OutlookSpy ribbon and go to the "Associated Contents" tab.)

  2. Use Redemption (I am also its author) and its RDORssFeeds and RDORssFeed objects - these objects will allow to add, modify and delete RSS feeds in Outlook.

Dmitry Streblechenko
  • 62,942
  • 4
  • 53
  • 78
  • The tools look promising, thanks. I am going to wait a little while for other answers before accepting your answer, though. Maybe there is a canonical, on-board way to do those things. Otherwise I am going to test OutlookSpy and Redemption. – kriegaex Jan 23 '14 at 20:36
  • You can also use Namespace.OpenSharedFolder in Outlook Object Model, but it is very limited and your mileage may vary greatly - http://msdn.microsoft.com/en-us/library/ff424473(v=office.14).aspx – Dmitry Streblechenko Jan 23 '14 at 20:49
  • I had problems wrapping my head around how to use OutlookSpy. Initially I wanted to automate the import wizard which can just read an OPML file. I saw no way to do that. What I ended up with was parsing the OPML file and using _NameSpace.OpenSharedFolder for each entry. This works quite nicely. If you can point me to a way to call the import wizard (headless, if possible), that would be great. – kriegaex Jan 24 '14 at 11:13
  • The import wizard cannot be programmatically invoked. – Dmitry Streblechenko Jan 24 '14 at 13:56