用Aspose.Words将表单信息写入到word模板中

1.首先是要下载Aspose.Words.dll

2.建立word模板我的模板时会议联系函.doc

3.页面

< div id ="top" >
< ul style ="height:50px;margin:0px;" >
< li style ="float:left;" >

< asp:Button ID ="btnSave" runat ="server" Text ="保 存" Width ="60px" CssClass ="btn" />

< asp:Button ID ="btnExport" runat ="server" Text ="导 出" CssClass ="btn" Width ="60px" OnClick ="btnExport_Click" />
</ li >

</ ul >

</ div >
< div id ="Container" >
< div id ="Header" >

< div id ="Title" >
< ul style ="height:50px;" >
< li > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 武汉市政府投资工程审查 </ li >
</ ul >
</ div >

< div id ="TitleSecond" >
< ul style ="height:50px;" >
< li > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 会议联系函 </ li >
</ ul >
</ div >

</ div >

< div id ="BodyPage" >
< div class ="Content1" >
< ul style ="height:1px;" >
< li > 市建委基础设施处: </ li >
</ ul >
</ div >

< div class ="Content1" >
< ul style ="height:1px; margin:0px;" >
< li style ="width:30px;float:left" ></ li >
< li style ="float:left;" >
< input id ="TxtDesigner" type ="text" runat ="server" class ="tbxBottom" style ="width: 350px" />
</ li >
< li style ="float:left" > (建设单位)到我办报审的 </ li >
</ ul >

< ul style ="height:20px; margin:0px;" >
< li style ="float:left" >< input id ="TxtProject" runat ="server" type ="text" class ="tbxBottom" style ="width: 450px" /></ li >
< li style ="float:left;" > (项目) </ li >
</ ul >

< ul style ="height:30px; margin:0px;" >
< li style ="float:left;margin:4px auto;" > ( </ li >
< li style ="float:left;" >
<% -- < uc1:MLCheckBoxList id = " MLCheckBoxList1 " runat = " server " ></ uc1:MLCheckBoxList >-- %>
< input id ="Checkbox1" name ="Checkbox1" runat ="server" type ="checkbox" value ="项目建议书" /> 项目建议书
< input id ="Checkbox2" name ="Checkbox2" runat ="server" type ="checkbox" value ="可行性研究" /> 可行性研究
< input id ="Checkbox3" name ="Checkbox3" runat ="server" type ="checkbox" value ="初步设计" /> 初步设计

</ li >
< li style ="float:left;margin:4px auto;" > )文件,拟于 </ li >
< li style ="float:left;" > 2010年7月10日上午10时 </ li >
< li style ="float:left;margin:7px auto;" > </ li >
</ ul >


< ul style ="height:20px; margin:0px;" >
< li style ="float:left;" >< input id ="TxtAddress" runat ="server" type ="text" class ="tbxBottom" style ="width: 350px" /></ li >
< li style ="float:left;margin:5px auto;" > 召开评审会,现在需要邀请以下管 </ li >
</ ul >

< ul style ="height:20px; margin:0px;" >
< li style ="float:left;margin:5px auto;" > 理部门参加: </ li >
< li style ="float:left;" >< input id ="TxtDepartMent1" runat ="server" type ="text" class ="tbxBottom" style ="width: 150px" /></ li >
< li style ="float:left;" >< input id ="TxtDepartMent2" runat ="server" type ="text" class ="tbxBottom" style ="width: 150px" /></ li >
< li style ="float:left;" >< input id ="TxtDepartMent3" runat ="server" type ="text" class ="tbxBottom" style ="width: 150px" /></ li >
</ ul >

< ul style ="height:10px; margin:0px;" >
< li ></ li >
</ ul >

< ul style ="height:20px;" >
< li style ="float:left;padding:40 0 0 30px;" > 受否,请批示。 </ li >

</ ul >

< ul style ="height:10px; margin:0px;" >
< li style ="float:left;" >
< textarea id ="TxtDescription" runat ="server" cols ="8" rows ="5" class ="textNonClass" onmouseover ="this.className='textClass'" onmouseout ="this.className='textNonClass'" style ="width: 500px;" ></ textarea >
</ li >
</ ul >

< ul style ="height:50px; margin:0px;" >
< li ></ li >
</ ul >
< ul style ="height:10px; margin:0 0 0 30px;" >
< li style ="float:left" >
项目负责人:
</ li >
< li style ="float:left" >
< input type ="text" runat ="server" id ="TxtProjectPerson" class ="textNonClass" onmousemove ="this.className='textClass'" onmouseout ="this.className='textNonClass'" style ="width: 80px;" />
</ li >
< li style ="width:65px;" ></ li >
< li style ="float:left" >
联系电话:
</ li >
< li style ="float:left" >
< input type ="text" runat ="server" id ="TxtPhone" class ="textNonClass" onmousemove ="this.className='textClass'"
onmouseout
="this.className='textNonClass'" style ="width: 100px;" />
</ li >
</ ul >
< ul style ="height:10px; margin:0px;" >
< li ></ li >
</ ul >

< ul style ="height:10px; margin:0 0 0 30px;" >

< li style ="float:left" >
部门负责人:
</ li >

< li style ="float:left; width:90px;" >
< input type ="text" id ="TxtDepartmentHead" runat ="server" class ="textNonClass" onmousemove ="this.className='textClass'" onmouseout ="this.className='tbxNoneSolid'" style ="width: 80px;" />
</ li >
< li style ="width:60px;" ></ li >
< li style ="float:left" >
分管领导:
</ li >
< li style ="float:left" >
< input type ="text" runat ="server" id ="TxtLeaderShip" class ="textNonClass" onmousemove ="this.className='textClass'"
onmouseout
="this.className='textNonClass'" style ="width: 100px;" />
</ li >
</ ul >

< ul style ="height:50px; margin:0px;" >
< li ></ li >
</ ul >

< ul style ="height:10px; margin:0px;" >
< li > 注:本函一式二份,一份报基础设施处,一份责任部门留存。 </ li >
</ ul >
< ul style ="height:70px; margin:0px;" >
< li ></ li >
</ ul >
< ul style ="height:10px; margin:0px;" >
< li > < span class ="BoldFont" > &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 武汉市建设工程设计审查办公室 </ span ></ li >
</ ul >



</ div >
< div class ="Content2" >
< ul style ="height:10px; margin:0 0 0 180px;; position:relative;" >
< li >


</ li >
</ ul >
</ div >

< div class ="Content1" >
< ul style ="height:10px; margin:0px;" >
< li style ="float:left; margin:30px auto;" > 基础设施处意见: </ li >
< li style ="float:left; width:200px;" > < textarea id ="TxtIdea" runat ="server" cols ="5" rows ="5" class ="textNonClass" onmouseover ="this.className='textClass'" onmouseout ="this.className='textNonClass'" style ="width: 180px;" ></ textarea ></ li >
< li style ="float:left; margin:30px auto;" > 签字: </ li >
< li style ="float:left; margin:30px auto;" >
< input type ="text" id ="TxtSign" runat ="server" class ="textNonClass" onmousemove ="this.className='textClass'"
onmouseout
="this.className='textNonClass'" style ="width: 60px;" />
</ li >
</ ul >
</ div >



</ div >
4..cs文件

你可能感兴趣的:(asp)