New Outlook VSTO AddIn: How to disable Reply To All and Forward in Outlook 2007 August 21, '08 Comments [6] Posted in Source Code | Tools Sponsored By 2010 UPDATE: Gavin has released an updated version of his No Reply To All Add-In on the Microsoft Research Site. Go get it free! Last October I posted a Macro-quasi-hack to Disable Reply To All and Forward in Outlook within your own company network. The technique uses a macro to flip a metadata bit in a message. Of course the only REAL way truly to disable Reply to All and Forward is to use IRM (Intellectual Rights Management) in Outlook 2003/7. However, this technique was useful to a lot of people as it is super simple and can stop those "knee-jerk" Reply to Alls. Anyway, after this post Gavin Smyth of Microsoft Research emailed me and said: "However, it's still such a useful idea that I finally got round to writing a C# addin to do it (vaaaassst overkill, I know, but it was easy) - toggle buttons (one for reply, one for forward) on the ribbon that set the two flags appropriately." Cool. He's written his first Visual Studio Tools for Office (VSTO) AddIn, and it's a good tutorial on how to write one! The general idea os: Start with the VS Outlook Add-In project wizard Add the ribbon group & buttons Create click event handlers for both, replicating what was in your my blog posting Poof. Package and Deploy. It's really obscenely easy. Actually, way easier than the macro way I did it. Now my Messages have these nice shiny new icons: The source is trivial:using System;using Microsoft.Office.Tools.Ribbon;using Outlook = Microsoft.Office.Interop.Outlook;using Office = Microsoft.Office.Core;namespace NoReplyAllAddin{ public partial class Ribbon : OfficeRibbon { public Ribbon() { InitializeComponent(); } private bool SetActionFromButton( object sender, object context, string action ) { bool oldValue = false; Outlook.Inspector inspector = context as Outlook.Inspector; if( inspector != null ) { Outlook.MailItem msg = inspector.CurrentItem as Outlook.MailItem; if( msg != null ) { oldValue = msg.Actions[ action ].Enabled; RibbonToggleButton btn = (RibbonToggleButton)sender; msg.Actions[ action ].Enabled = !btn.Checked; } } return oldValue; } private void OnClickNoReplyAll( object sender, RibbonControlEventArgs e ) { SetActionFromButton( sender, e.Control.Context, "Reply to All" ); } private void OnClickNoForward( object sender, RibbonControlEventArgs e ) { SetActionFromButton( sender, e.Control.Context, "Forward" ); } }} You can download the setup and/or the source for Gavin's "No Reply for Outlook 2007" over at his Software Utilities site. Thanks to Gavin! « The Weekly Source Code 32- Atom, AtomPub... | Blog Home | ASP.NET Futures - Generating Dynamic Ima... » About Scott Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author. About Newsletter Sponsored By Hosting By