用C#输出word格式,但不知道为什么输出 讲师,课程 这两列会这么大
我用
WordApp.Selection.Font.Size = 13;
WordApp.Selection.Font.Bold = 0;
这两句代码去控件它,但还是不行,不知道为什么。
这个问题很急,希望大家帮忙 private void word_Click(object sender, EventArgs e)
        {
            object missing = System.Reflection.Missing.Value;
            String name = DateTime.Now.ToFileTime() + ".doc";
            Object filename = @"C:\"+name; 
            Microsoft.Office.Interop.Word.Application WordApp = new Microsoft.Office.Interop.Word.ApplicationClass();
            Microsoft.Office.Interop.Word.Document WordDoc = WordApp.Documents.Add(ref missing, ref missing, ref missing, ref missing);
            WordApp.Selection.Font.Size = 25;
            WordApp.Selection.Font.Bold = 5;
            WordApp.Selection.ParagraphFormat.Alignment = WdParagraphAlignment.wdAlignParagraphCenter;
            WordApp.Selection.TypeText("课程统计表");
            object count = 15;
            object wordline = Microsoft.Office.Interop.Word.WdUnits.wdLine;
            WordApp.Selection.MoveDown(ref wordline,ref count,ref missing);
            WordApp.Selection.TypeParagraph();
            Microsoft.Office.Interop.Word.Table newTable = WordDoc.Tables.Add(WordApp.Selection.Range, 2, 11,ref missing,ref missing);
            WordApp.Selection.Font.Size = 13;
            WordApp.Selection.Font.Bold = 0;
            newTable.Cell(1, 1).Range.Text = "课号";
            newTable.Cell(1, 2).Range.Text = "讲师";
            newTable.Cell(1, 3).Range.Text = "课程";

            WordDoc.SaveAs(ref filename, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, 
                ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing);
            WordDoc.Close(ref missing, ref missing, ref missing);
            WordApp.Quit(ref missing, ref missing, ref missing);        }
这张图是生成之后的图,真的不知道为什么讲师和课程这两列为什么这么大。。http://hi.baidu.com/de%C2%DE%CE%F7%CA%C7%CC%DF%C7%F2de/album