Microsoft.Office.Interop.Word.Application WordApp = new Microsoft.Office.Interop.Word.ApplicationClass();
                Microsoft.Office.Interop.Word.Document WordDoc = WordApp.Documents.Add(ref Nothing, ref Nothing, ref Nothing, ref Nothing);
                index = 1;
                //Microsoft.Office.Interop.Word.Paragraph oPara1 = WordDoc.Content.Paragraphs.Add(ref Nothing);
                //oPara1.Range.Font.Name = "Verdana";  
                //oPara1.Range.Font.Size = 20;  
                //oPara1.Range.Text = dt_试卷信息.Rows[0]["S_试卷标题"].ToString();  
                //oPara1.Range.ParagraphFormat.Alignment = Microsoft.Office.Interop.Word.WdParagraphAlignment.wdAlignParagraphCenter;     
                //oPara1.Range.InsertParagraphAfter();//
                WordDoc.Paragraphs.Last.Range.Text = dt_试卷信息.Rows[0]["S_试卷标题"].ToString() + "\n\r";
                Add_选择题(WordDoc);
                Add_填空题(WordDoc);
                Add_判断题(WordDoc);
                Add_名词解释题(WordDoc);
                Add_简答题(WordDoc);
                WordDoc.SaveAs(ref filename, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing);
                WordDoc.Close(ref Nothing, ref Nothing, ref Nothing);
                WordApp.Quit(ref Nothing, ref Nothing, ref Nothing);
                MessageBox.Show("试卷生成完毕");
           }}
        
        private void button1_Click(object sender, EventArgs e)
        {
            this.Close();
        }
        S_试题筛选 s_试题筛选;
        private void S_筛选_Load(object sender, EventArgs e)
        {
            s_试题筛选 = new S_试题筛选();
            this.Controls.Add(s_试题筛选);
上一篇:C#高职计算机导论考试系统设计与实现
下一篇:VB设备管理系统设计+需求分析+可行性分析

项目教學法茬计算机网络...

计算机网络长距离布线时...

计算机网络词汇翻译浅析【3130字】

计算机网络管理技术及其應用【2349字】

计算机网络安全问题剖析【4836字】

计算机网络【9428字】

浅谈高职院校计算机网络实践教學【2060字】

神经外科重症监护病房患...

10万元能开儿童乐园吗,我...

中国学术生态细节考察《...

公寓空调设计任务书

承德市事业单位档案管理...

医院财务风险因素分析及管理措施【2367字】

AT89C52单片机的超声波测距...

C#学校科研管理系统的设计

国内外图像分割技术研究现状

志愿者活动的调查问卷表