资源描述:
《新概念英语20071210》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、教育资源分享usingSystem;usingSystem.Data;usingSystem.Data.SqlClient;usingSystem.Data.Sql;usingSystem.IO;usingSystem.Configuration;usingSystem.Collections;usingSystem.Web;usingSystem.Web.Security;usingSystem.Web.UI;usingSystem.Web.UI.WebControls;usingSystem.Web.UI.WebContro
2、ls.WebParts;usingSystem.Web.UI.HtmlControls;usingWord=Microsoft.Office.Interop.Word;usingBuilderProject.DAL;publicpartialclassDefault2:System.Web.UI.Page{protectedvoidPage_Load(objectsender,EventArgse){Stringstr_ID="CFB-450001";CreateWord(str_ID);}protectedvoidCreate
3、Word(Stringstr_ID){intcount=1;//产生table数量Word.ApplicationClassapp=newWord.ApplicationClass();Word._Documentdoc=null;objectmissingValue=System.Reflection.Missing.Value;objectoriginalFormat=System.Reflection.Missing.Value;objectrouteDocument=System.Reflection.Missing.V
4、alue;objectdocreadonly=false;objectNOTsaveChanges=false;objectfileName=@"G:BuildProjectBudgetForm.doc";doc=app.Documents.Open(reffileName,refmissingValue,refdocreadonly,refmissingValue,refmissingValue,refmissingValue,refmissingValue,refmissingValue,refmissingValue,r
5、efmissingValue,refmissingValue,refmissingValue,refmissingValue,refmissingValue,refmissingValue,refmissingValue);try{///生成第一表objectBookHead="Head";Word.RangeHead=app.ActiveDocument.Bookmarks.get_Item(refBookHead).Range;DataSetdataSet=GetBudget(str_ID);intHeadrows=5;in
6、tHeadcols=6;doc.Tables.Add(Head,Headrows,Headcols,refmissingValue,refmissingValue);//给表格划线Head.Tables[1].Borders[Word.WdBorderType.wdBorderTop].LineStyle=Word.WdLineStyle.wdLineStyleSingle;Head.Tables[1].Borders[Word.WdBorderType.wdBorderLeft].LineStyle=Word.WdLineSt
7、yle.wdLineStyleSingle;教育资源分享,构建知识库教育资源分享Head.Tables[1].Borders[Word.WdBorderType.wdBorderRight].LineStyle=Word.WdLineStyle.wdLineStyleSingle;Head.Tables[1].Borders[Word.WdBorderType.wdBorderBottom].LineStyle=Word.WdLineStyle.wdLineStyleSingle;Head.Tables[1].Borders[W
8、ord.WdBorderType.wdBorderHorizontal].LineStyle=Word.WdLineStyle.wdLineStyleSingle;Head.Tables[1].Borders[Word.WdBorderType.wdBorder