Example #1
0
        private void SetBookmarkCheckBoxValue(Microsoft.Office.Interop.Word.Range range, object value, string type)
        {
            object obj     = "Wingdings 2";
            object unicode = System.Text.Encoding.Unicode;
            object obj2    = true;

            if (type.Equals("□") && range.Text == "\r\a")
            {
                range.SetRange(range.Start, range.Start);
            }
            if (value != null && !string.IsNullOrEmpty(value.ToString()) && !value.ToString().Equals("0"))
            {
                if (type.Equals("□"))
                {
                    range.InsertSymbol(-4014, ref obj, ref obj2, ref this.missing);
                }
                else
                {
                    range.Text = "√";
                }
            }
            else if (type.Equals("□"))
            {
                range.InsertSymbol(-3933, ref obj, ref obj2, ref this.missing);
            }
            else
            {
                range.Text = "×";
            }
        }