stop automated word add in RRS feed

  • Question

  • Hi,

    I have created this word Add-in using VS2010

    namespace WordAddInTest
        public partial class ThisAddIn
            private void ThisAddIn_Startup(object sender, System.EventArgs e)
                this.Application.DocumentBeforeSave += new Word.ApplicationEvents4_DocumentBeforeSaveEventHandler(Application_DocumentBeforeSave);
            void Application_DocumentBeforeSave(Word.Document Doc, ref bool SaveAsUI, ref bool Cancel)
                Doc.Paragraphs[1].Range.Text = "This text was added by using code.";
            private void ThisAddIn_Shutdown(object sender, System.EventArgs e)
            #region VSTO generated code
            /// <summary>
            /// Required method for Designer support - do not modify
            /// the contents of this method with the code editor.
            /// </summary>
            private void InternalStartup()
                this.Startup += new System.EventHandler(ThisAddIn_Startup);
                this.Shutdown += new System.EventHandler(ThisAddIn_Shutdown);

    After run it in debug mode the text was adding as expected, however know, when i open word via start/programms and save any of my documents this text gets added too. How can I stop/remove this?


    Monday, November 21, 2011 12:44 PM


  • If you open the project in Visual Studio, under 'Build', you can click 'clean solution'.

    Or, instead, you could go to office pearl > Word options > Add-Ins (in Word 2010, it will slightly different for 2007) and remove it there.

    • Marked as answer by mocasu Tuesday, November 22, 2011 6:29 AM
    Tuesday, November 22, 2011 2:25 AM