I am having issues with using the Dictionary class type after declaring a parameter.
It resulted in a null value error when it was compiled.
Can anyone fix this?
using System; using System.Windows.Forms; using Microsoft.Office.Interop.Word; using System.Collections.Generic; namespace Word_Doc_002 { public partial class ThisDocument { Dictionary dictionWord; private void ThisDocument_Startup(object sender, System.EventArgs e) { dictionWord.Application.CheckSpelling("big", WdDictionaryType.wdSpelling); //Compile time error. dictionWord was Null. } private void ThisDocument_Shutdown(object sender, System.EventArgs e) { } #region VSTO Designer 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(ThisDocument_Startup); this.Shutdown += new System.EventHandler(ThisDocument_Shutdown); } #endregion } }