How do I create a "Blog This" button in Outlook 2007

Today I created a “Blog This” button in Outlook 2007

Create a macro with this VBA Macro

Const FEED_URL = "{00062041-0000-0000-C000-000000000046}/0x8900001F"Const FEED_NAME = "{00062041-0000-0000-C000-000000000046}/0x8904001F"Const ITEM_URL = "{00062041-0000-0000-C000-000000000046}/0x8901001F"Sub BlogThis()Set liveWriter = CreateObject("WindowsLiveWriter.Application")If (liveWriter Is Nothing) ThenMsgBox "It appears that Windows Live Writer is not installed"Exit SubEnd IfIf (ActiveExplorer.Selection.Item(1).MessageClass <> "IPM.Post.Rss") ThenMsgBox "The currently selected item is not a RSS Post"Exit SubEnd IfDim rssItem As PostItemDim pa As PropertyAccessorSet rssItem = ActiveExplorer.Selection.Item(1)Set pa = rssItem.PropertyAccessorfeedUrl = pa.GetProperty(FEED_URL)feedName = pa.GetProperty(FEED_NAME)itemUrl = pa.GetProperty(ITEM_URL)itemTitle = rssItem.SubjectitemContents = rssItem.HTMLBodyliveWriter.BlogThisFeedItem feedName, itemTitle, itemUrl, itemContents, feedUrl, _authorMissing, autherEmailMissing, publishDateMissingEnd Sub


Sub Application_ItemContextMenuDisplay(ByVal CommandBar As Office.CommandBar, ByVal Selection As Selection)If (Selection.Count = 1 And Selection.Item(1).MessageClass = "IPM.Post.Rss") ThenSet blogThisBtn = CommandBar.Controls.Add(Type:=msoControlButton)blogThisBtn.Caption = "Blog This in Live Writer"blogThisBtn.OnAction = "Project1.ThisOutlookSession.BlogThis"End IfEnd Sub

Leave a Reply