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 = "http://schemas.microsoft.com/mapi/id/{00062041-0000-0000-C000-000000000046}/0x8900001F"Const FEED_NAME = "http://schemas.microsoft.com/mapi/id/{00062041-0000-0000-C000-000000000046}/0x8904001F"Const ITEM_URL = "http://schemas.microsoft.com/mapi/id/{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
 
Línks:
 
http://mindjetlabs.com/cs/blogs/synergist/archive/2007/05/23/Adding-a-VBA-Macro-to-Outlook.aspx
http://weblogs.asp.net/whaggard/archive/2006/10/30/Windows-Live-Writer-BlogThis-macro-for-Outlook-2007.aspx
http://outlookcode.com/article.aspx?id=49
http://blogs.technet.com/kclemson/pages/87358.aspx

Comments

Leave a Reply

To respond on your own website, enter the URL of your response which should contain a link to this post's permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post's URL again. (Find out more about Webmentions.)