'How to import OPML file into Outlook 2013 via VBA?

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?



Solution 1:[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.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1