private void ThisAddIn_Startup(object sender, EventArgs e) { this.Application.DocumentBeforeSave += new Word.ApplicationEvents4_DocumentBeforeSaveEventHandler(Application_DocumentBeforeSave); } void Application_DocumentBeforeSave(Word.Document Doc, ref bool SaveAsUI, ref bool Cancel) { if (Doc.Name != null) if(Doc.Name.Length>3) if (Doc.Name.Substring(0, 3).Equals("Enc")) Cancel = true; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)