代码语言
.
CSharp
.
JS
Java
Asp.Net
C
MSSQL
PHP
Css
PLSQL
Python
Shell
EBS
ASP
Perl
ObjC
VB.Net
VBS
MYSQL
GO
Delphi
AS
DB2
Domino
Rails
ActionScript
Scala
代码分类
文件
系统
字符串
数据库
网络相关
图形/GUI
多媒体
算法
游戏
Jquery
Extjs
Android
HTML5
菜单
网页交互
WinForm
控件
企业应用
安全与加密
脚本/批处理
开放平台
其它
【
CSharp
】
C#操作Word
作者:
Dezai.CN
/ 发布于
2011/7/26
/
419
前提:导入COM库:Microsoft word 11.0 Object Library.引用里面就增加了:
<div> <p style="padding-bottom: 0px; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px">创建新Word <div style="padding-bottom: 0px; border-right-width: 0px; overflow-x: auto; overflow-y: auto; background-color: rgb(231,229,220); margin: 18px 0px; padding-left: 0px; width: 1044px; padding-right: 0px; font-family: Consolas, "Courier New", Courier, mono, serif; border-top-width: 0px; border-bottom-width: 0px; font-size: 12px; border-left-width: 0px; padding-top: 1px" class="dp-highlighter bg_csharp"> <div style="padding-bottom: 0px; border-right-width: 0px; margin: 0px; padding-left: 45px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" class="bar"> <div style="border-left: rgb(108,226,108) 3px solid; padding-bottom: 10px; border-right-width: 0px; background-color: rgb(248,248,248); margin: 0px; padding-left: 10px; padding-right: 8px; font: 9px Verdana, Geneva, Arial, Helvetica, sans-serif; border-top-width: 0px; border-bottom-width: 0px; color: silver; padding-top: 3px; font-size-adjust: none; font-stretch: normal" class="tools"><a style="background-image: url(http://static.blog.csdn.net/scripts/SyntaxHighlighter/styles/images/default/ico_plain.gif); padding-bottom: 1px; text-indent: -2000px; margin: 0px 10px 0px 0px; padding-left: 1px; width: 16px; padding-right: 1px; display: inline-block; height: 16px; color: rgb(160,160,160); font-size: 9px; text-decoration: none; padding-top: 1px" class="ViewSource" title="view plain" href="http://blog.csdn.net/jane_sl/article/details/6626025">view plain</a></div> </div> <ol style="padding-bottom: 0px; background-color: rgb(255,255,255); list-style-type: decimal; margin: 0px 0px 1px 45px; padding-left: 0px; padding-right: 0px; color: rgb(92,92,92); padding-top: 0px" class="dp-c"> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">object</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> oMissing = System.Reflection.Missing.Value; </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">Word._Application oWord; </span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">Word._Document oDoc; </span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">oWord = <span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">new</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> Word.Application(); </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">oWord.Visible = <span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">true</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">; </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">oDoc = oWord.Documents.Add(<span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> oMissing, </span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> oMissing, </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> oMissing, </span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> oMissing); </span></span></li> </ol> </div> <p style="padding-bottom: 0px; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px"><br style="padding-bottom: 0px; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" /> 打开文档: <div style="padding-bottom: 0px; border-right-width: 0px; overflow-x: auto; overflow-y: auto; background-color: rgb(231,229,220); margin: 18px 0px; padding-left: 0px; width: 1044px; padding-right: 0px; font-family: Consolas, "Courier New", Courier, mono, serif; border-top-width: 0px; border-bottom-width: 0px; font-size: 12px; border-left-width: 0px; padding-top: 1px" class="dp-highlighter bg_csharp"> <div style="padding-bottom: 0px; border-right-width: 0px; margin: 0px; padding-left: 45px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" class="bar"> <div style="border-left: rgb(108,226,108) 3px solid; padding-bottom: 10px; border-right-width: 0px; background-color: rgb(248,248,248); margin: 0px; padding-left: 10px; padding-right: 8px; font: 9px Verdana, Geneva, Arial, Helvetica, sans-serif; border-top-width: 0px; border-bottom-width: 0px; color: silver; padding-top: 3px; font-size-adjust: none; font-stretch: normal" class="tools"><a style="background-image: url(http://static.blog.csdn.net/scripts/SyntaxHighlighter/styles/images/default/ico_plain.gif); padding-bottom: 1px; text-indent: -2000px; margin: 0px 10px 0px 0px; padding-left: 1px; width: 16px; padding-right: 1px; display: inline-block; height: 16px; color: rgb(160,160,160); font-size: 9px; text-decoration: none; padding-top: 1px" class="ViewSource" title="view plain" href="http://blog.csdn.net/jane_sl/article/details/6626025">view plain</a></div> </div> <ol style="padding-bottom: 0px; background-color: rgb(255,255,255); list-style-type: decimal; margin: 0px 0px 1px 45px; padding-left: 0px; padding-right: 0px; color: rgb(92,92,92); padding-top: 0px" class="dp-c"> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">object</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> oMissing = System.Reflection.Missing.Value; </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">Word._Application oWord; </span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">Word._Document oDoc; </span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">oWord = <span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">new</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> Word.Application(); </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">oWord.Visible = <span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">true</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">; </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">object</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> fileName = @</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: blue; padding-top: 0px" class="string">"E:CCCXCXXTestDoc.doc"</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">; </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">oDoc = oWord.Documents.Open(<span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> fileName, </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> oMissing, </span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> oMissing, </span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> oMissing, </span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> oMissing, </span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> oMissing, </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> oMissing, </span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> oMissing, </span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> oMissing, </span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> oMissing, </span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> oMissing, </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> oMissing, </span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> oMissing, </span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> oMissing, </span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> oMissing, </span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> oMissing); </span></span></li> </ol> </div> <p style="padding-bottom: 0px; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px"><br style="padding-bottom: 0px; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" /> 导入模板 <div style="padding-bottom: 0px; border-right-width: 0px; overflow-x: auto; overflow-y: auto; background-color: rgb(231,229,220); margin: 18px 0px; padding-left: 0px; width: 1044px; padding-right: 0px; font-family: Consolas, "Courier New", Courier, mono, serif; border-top-width: 0px; border-bottom-width: 0px; font-size: 12px; border-left-width: 0px; padding-top: 1px" class="dp-highlighter bg_csharp"> <div style="padding-bottom: 0px; border-right-width: 0px; margin: 0px; padding-left: 45px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" class="bar"> <div style="border-left: rgb(108,226,108) 3px solid; padding-bottom: 10px; border-right-width: 0px; background-color: rgb(248,248,248); margin: 0px; padding-left: 10px; padding-right: 8px; font: 9px Verdana, Geneva, Arial, Helvetica, sans-serif; border-top-width: 0px; border-bottom-width: 0px; color: silver; padding-top: 3px; font-size-adjust: none; font-stretch: normal" class="tools"><a style="background-image: url(http://static.blog.csdn.net/scripts/SyntaxHighlighter/styles/images/default/ico_plain.gif); padding-bottom: 1px; text-indent: -2000px; margin: 0px 10px 0px 0px; padding-left: 1px; width: 16px; padding-right: 1px; display: inline-block; height: 16px; color: rgb(160,160,160); font-size: 9px; text-decoration: none; padding-top: 1px" class="ViewSource" title="view plain" href="http://blog.csdn.net/jane_sl/article/details/6626025">view plain</a></div> </div> <ol style="padding-bottom: 0px; background-color: rgb(255,255,255); list-style-type: decimal; margin: 0px 0px 1px 45px; padding-left: 0px; padding-right: 0px; color: rgb(92,92,92); padding-top: 0px" class="dp-c"> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">object</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> oMissing = System.Reflection.Missing.Value; </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">Word._Application oWord; </span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">Word._Document oDoc; </span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">oWord = <span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">new</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> Word.Application(); </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">oWord.Visible = <span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">true</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">; </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">object</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> fileName = @</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: blue; padding-top: 0px" class="string">"E:XXXCCXTest.doc"</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">; </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">oDoc = oWord.Documents.Add(<span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> fileName, </span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> oMissing, </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> oMissing, </span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> oMissing); </span></span></li> </ol> </div> <p style="padding-bottom: 0px; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px"><br style="padding-bottom: 0px; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" /> .添加新表 <div style="padding-bottom: 0px; border-right-width: 0px; overflow-x: auto; overflow-y: auto; background-color: rgb(231,229,220); margin: 18px 0px; padding-left: 0px; width: 1044px; padding-right: 0px; font-family: Consolas, "Courier New", Courier, mono, serif; border-top-width: 0px; border-bottom-width: 0px; font-size: 12px; border-left-width: 0px; padding-top: 1px" class="dp-highlighter bg_csharp"> <div style="padding-bottom: 0px; border-right-width: 0px; margin: 0px; padding-left: 45px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" class="bar"> <div style="border-left: rgb(108,226,108) 3px solid; padding-bottom: 10px; border-right-width: 0px; background-color: rgb(248,248,248); margin: 0px; padding-left: 10px; padding-right: 8px; font: 9px Verdana, Geneva, Arial, Helvetica, sans-serif; border-top-width: 0px; border-bottom-width: 0px; color: silver; padding-top: 3px; font-size-adjust: none; font-stretch: normal" class="tools"><a style="background-image: url(http://static.blog.csdn.net/scripts/SyntaxHighlighter/styles/images/default/ico_plain.gif); padding-bottom: 1px; text-indent: -2000px; margin: 0px 10px 0px 0px; padding-left: 1px; width: 16px; padding-right: 1px; display: inline-block; height: 16px; color: rgb(160,160,160); font-size: 9px; text-decoration: none; padding-top: 1px" class="ViewSource" title="view plain" href="http://blog.csdn.net/jane_sl/article/details/6626025">view plain</a></div> </div> <ol style="padding-bottom: 0px; background-color: rgb(255,255,255); list-style-type: decimal; margin: 0px 0px 1px 45px; padding-left: 0px; padding-right: 0px; color: rgb(92,92,92); padding-top: 0px" class="dp-c"> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">object</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> oMissing = System.Reflection.Missing.Value; </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">Word._Application oWord; </span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">Word._Document oDoc; </span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">oWord = <span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">new</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> Word.Application(); </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">oWord.Visible = <span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">true</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">; </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">oDoc = oWord.Documents.Add(<span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> oMissing, </span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> oMissing, </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> oMissing, </span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> oMissing); </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">object</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> start = 0; </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">object</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> end = 0; </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">Word.Range tableLocation = oDoc.Range(<span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> start, </span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> end); </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">oDoc.Tables.Add(tableLocation, 3, 4, <span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> oMissing, </span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> oMissing); </span></span></li> </ol> </div> <p style="padding-bottom: 0px; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px"><br style="padding-bottom: 0px; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" /> 表插入行 <div style="padding-bottom: 0px; border-right-width: 0px; overflow-x: auto; overflow-y: auto; background-color: rgb(231,229,220); margin: 18px 0px; padding-left: 0px; width: 1044px; padding-right: 0px; font-family: Consolas, "Courier New", Courier, mono, serif; border-top-width: 0px; border-bottom-width: 0px; font-size: 12px; border-left-width: 0px; padding-top: 1px" class="dp-highlighter bg_csharp"> <div style="padding-bottom: 0px; border-right-width: 0px; margin: 0px; padding-left: 45px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" class="bar"> <div style="border-left: rgb(108,226,108) 3px solid; padding-bottom: 10px; border-right-width: 0px; background-color: rgb(248,248,248); margin: 0px; padding-left: 10px; padding-right: 8px; font: 9px Verdana, Geneva, Arial, Helvetica, sans-serif; border-top-width: 0px; border-bottom-width: 0px; color: silver; padding-top: 3px; font-size-adjust: none; font-stretch: normal" class="tools"><a style="background-image: url(http://static.blog.csdn.net/scripts/SyntaxHighlighter/styles/images/default/ico_plain.gif); padding-bottom: 1px; text-indent: -2000px; margin: 0px 10px 0px 0px; padding-left: 1px; width: 16px; padding-right: 1px; display: inline-block; height: 16px; color: rgb(160,160,160); font-size: 9px; text-decoration: none; padding-top: 1px" class="ViewSource" title="view plain" href="http://blog.csdn.net/jane_sl/article/details/6626025">view plain</a></div> </div> <ol style="padding-bottom: 0px; background-color: rgb(255,255,255); list-style-type: decimal; margin: 0px 0px 1px 45px; padding-left: 0px; padding-right: 0px; color: rgb(92,92,92); padding-top: 0px" class="dp-c"> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">object</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> oMissing = System.Reflection.Missing.Value; </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">Word._Application oWord; </span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">Word._Document oDoc; </span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">oWord = <span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">new</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> Word.Application(); </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">oWord.Visible = <span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">true</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">; </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">oDoc = oWord.Documents.Add(<span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> oMissing, </span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> oMissing, </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> oMissing, </span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> oMissing); </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">object</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> start = 0; </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">object</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> end = 0; </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">Word.Range tableLocation = oDoc.Range(<span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> start, </span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> end); </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">oDoc.Tables.Add(tableLocation, 3, 4, <span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> oMissing, </span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> oMissing); </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">Word.Table newTable = oDoc.Tables[1]; </span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">object</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> beforeRow = newTable.Rows[1]; </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">newTable.Rows.Add(<span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> beforeRow); </span></span></li> </ol> </div> <p style="padding-bottom: 0px; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px"><br style="padding-bottom: 0px; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" /> 单元格合并 <div style="padding-bottom: 0px; border-right-width: 0px; overflow-x: auto; overflow-y: auto; background-color: rgb(231,229,220); margin: 18px 0px; padding-left: 0px; width: 1044px; padding-right: 0px; font-family: Consolas, "Courier New", Courier, mono, serif; border-top-width: 0px; border-bottom-width: 0px; font-size: 12px; border-left-width: 0px; padding-top: 1px" class="dp-highlighter bg_csharp"> <div style="padding-bottom: 0px; border-right-width: 0px; margin: 0px; padding-left: 45px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" class="bar"> <div style="border-left: rgb(108,226,108) 3px solid; padding-bottom: 10px; border-right-width: 0px; background-color: rgb(248,248,248); margin: 0px; padding-left: 10px; padding-right: 8px; font: 9px Verdana, Geneva, Arial, Helvetica, sans-serif; border-top-width: 0px; border-bottom-width: 0px; color: silver; padding-top: 3px; font-size-adjust: none; font-stretch: normal" class="tools"><a style="background-image: url(http://static.blog.csdn.net/scripts/SyntaxHighlighter/styles/images/default/ico_plain.gif); padding-bottom: 1px; text-indent: -2000px; margin: 0px 10px 0px 0px; padding-left: 1px; width: 16px; padding-right: 1px; display: inline-block; height: 16px; color: rgb(160,160,160); font-size: 9px; text-decoration: none; padding-top: 1px" class="ViewSource" title="view plain" href="http://blog.csdn.net/jane_sl/article/details/6626025">view plain</a></div> </div> <ol style="padding-bottom: 0px; background-color: rgb(255,255,255); list-style-type: decimal; margin: 0px 0px 1px 45px; padding-left: 0px; padding-right: 0px; color: rgb(92,92,92); padding-top: 0px" class="dp-c"> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">object</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> oMissing = System.Reflection.Missing.Value; </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">Word._Application oWord; </span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">Word._Document oDoc; </span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">oWord = <span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">new</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> Word.Application(); </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">oWord.Visible = <span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">true</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">; </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">oDoc = oWord.Documents.Add(<span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> oMissing, </span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> oMissing, </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> oMissing, </span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> oMissing); </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">object</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> start = 0; </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">object</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> end = 0; </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">Word.Range tableLocation = oDoc.Range(<span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> start, </span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> end); </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">oDoc.Tables.Add(tableLocation, 3, 4, <span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> oMissing, </span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> oMissing); </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">Word.Table newTable = oDoc.Tables[1]; </span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">object</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> beforeRow = newTable.Rows[1]; </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">newTable.Rows.Add(<span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> beforeRow); </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">Word.Cell cell = newTable.Cell(1, 1); </span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">cell.Merge(newTable.Cell(1, 2)); </span></li> </ol> </div> <p style="padding-bottom: 0px; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px"><br style="padding-bottom: 0px; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" /> .单元格分离 <p style="padding-bottom: 0px; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px"> <div style="padding-bottom: 0px; border-right-width: 0px; overflow-x: auto; overflow-y: auto; background-color: rgb(231,229,220); margin: 18px 0px; padding-left: 0px; width: 1044px; padding-right: 0px; font-family: Consolas, "Courier New", Courier, mono, serif; border-top-width: 0px; border-bottom-width: 0px; font-size: 12px; border-left-width: 0px; padding-top: 1px" class="dp-highlighter bg_csharp"> <div style="padding-bottom: 0px; border-right-width: 0px; margin: 0px; padding-left: 45px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" class="bar"> <div style="border-left: rgb(108,226,108) 3px solid; padding-bottom: 10px; border-right-width: 0px; background-color: rgb(248,248,248); margin: 0px; padding-left: 10px; padding-right: 8px; font: 9px Verdana, Geneva, Arial, Helvetica, sans-serif; border-top-width: 0px; border-bottom-width: 0px; color: silver; padding-top: 3px; font-size-adjust: none; font-stretch: normal" class="tools"><a style="background-image: url(http://static.blog.csdn.net/scripts/SyntaxHighlighter/styles/images/default/ico_plain.gif); padding-bottom: 1px; text-indent: -2000px; margin: 0px 10px 0px 0px; padding-left: 1px; width: 16px; padding-right: 1px; display: inline-block; height: 16px; color: rgb(160,160,160); font-size: 9px; text-decoration: none; padding-top: 1px" class="ViewSource" title="view plain" href="http://blog.csdn.net/jane_sl/article/details/6626025">view plain</a></div> </div> <ol style="padding-bottom: 0px; background-color: rgb(255,255,255); list-style-type: decimal; margin: 0px 0px 1px 45px; padding-left: 0px; padding-right: 0px; color: rgb(92,92,92); padding-top: 0px" class="dp-c"> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">object</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> oMissing = System.Reflection.Missing.Value; </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">Word._Application oWord; </span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">Word._Document oDoc; </span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">oWord = <span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">new</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> Word.Application(); </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">oWord.Visible = <span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">true</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">; </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">oDoc = oWord.Documents.Add( oMissing, </span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> oMissing, </span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> oMissing); </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">object</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> start = 0; </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">object</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> end = 0; </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">Word.Range tableLocation = oDoc.Range(<span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> start, </span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> end); </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">oDoc.Tables.Add(tableLocation, 3, 4, <span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> oMissing, </span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> oMissing); </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">Word.Table newTable = oDoc.Tables[1]; </span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">object</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> beforeRow = newTable.Rows[1]; </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">newTable.Rows.Add(<span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> beforeRow); </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">Word.Cell cell = newTable.Cell(1, 1); </span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">cell.Merge(newTable.Cell(1, 2)); </span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">object</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> Rownum = 2; </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">object</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> Columnnum = 2; </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">cell.Split(<span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> Rownum, </span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> Columnnum); </span></span></li> </ol> </div> <p style="padding-bottom: 0px; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px"><br style="padding-bottom: 0px; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" /> 通过段落控制插入 <div style="padding-bottom: 0px; border-right-width: 0px; overflow-x: auto; overflow-y: auto; background-color: rgb(231,229,220); margin: 18px 0px; padding-left: 0px; width: 1044px; padding-right: 0px; font-family: Consolas, "Courier New", Courier, mono, serif; border-top-width: 0px; border-bottom-width: 0px; font-size: 12px; border-left-width: 0px; padding-top: 1px" class="dp-highlighter bg_csharp"> <div style="padding-bottom: 0px; border-right-width: 0px; margin: 0px; padding-left: 45px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" class="bar"> <div style="border-left: rgb(108,226,108) 3px solid; padding-bottom: 10px; border-right-width: 0px; background-color: rgb(248,248,248); margin: 0px; padding-left: 10px; padding-right: 8px; font: 9px Verdana, Geneva, Arial, Helvetica, sans-serif; border-top-width: 0px; border-bottom-width: 0px; color: silver; padding-top: 3px; font-size-adjust: none; font-stretch: normal" class="tools"><a style="background-image: url(http://static.blog.csdn.net/scripts/SyntaxHighlighter/styles/images/default/ico_plain.gif); padding-bottom: 1px; text-indent: -2000px; margin: 0px 10px 0px 0px; padding-left: 1px; width: 16px; padding-right: 1px; display: inline-block; height: 16px; color: rgb(160,160,160); font-size: 9px; text-decoration: none; padding-top: 1px" class="ViewSource" title="view plain" href="http://blog.csdn.net/jane_sl/article/details/6626025">view plain</a></div> </div> <ol style="padding-bottom: 0px; background-color: rgb(255,255,255); list-style-type: decimal; margin: 0px 0px 1px 45px; padding-left: 0px; padding-right: 0px; color: rgb(92,92,92); padding-top: 0px" class="dp-c"> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">object</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> oMissing = System.Reflection.Missing.Value; </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">object</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> oEndOfDoc = </span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: blue; padding-top: 0px" class="string">"\endofdoc"</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">; </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,130,0); padding-top: 0px" class="comment">/**/</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,130,0); padding-top: 0px" class="comment">/* endofdoc is a predefined bookmark */</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,130,0); padding-top: 0px" class="comment">//Start Word and create a new document.</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">Word._Application oWord; </span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">Word._Document oDoc; </span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">oWord = <span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">new</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> Word.Application(); </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">oWord.Visible = <span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">true</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">; </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">oDoc = oWord.Documents.Add(<span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> oMissing, </span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> oMissing, </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> oMissing, </span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> oMissing); </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,130,0); padding-top: 0px" class="comment">//Insert a paragraph at the beginning of the document.</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">Word.Paragraph oPara1; </span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">oPara1 = oDoc.Content.Paragraphs.Add(<span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> oMissing); </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">oPara1.Range.Text = <span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: blue; padding-top: 0px" class="string">"Heading 1"</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">; </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">oPara1.Range.Font.Bold = 1; </span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">oPara1.Format.SpaceAfter = 24; <span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,130,0); padding-top: 0px" class="comment">//24 pt spacing after paragraph.</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">oPara1.Range.InsertParagraphAfter(); </span></li> </ol> </div> <p style="padding-bottom: 0px; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px">添加表格行<br style="padding-bottom: 0px; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" /> doc.Content.Tables[0].Rows.Add(ref beforeRow); <p style="padding-bottom: 0px; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px">2.11、添加表格列<br style="padding-bottom: 0px; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" /> doc.Content.Tables[0].Columns.Add(ref beforeColumn); <p style="padding-bottom: 0px; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px">2.12、文本居中 <div style="padding-bottom: 0px; border-right-width: 0px; overflow-x: auto; overflow-y: auto; background-color: rgb(231,229,220); margin: 18px 0px; padding-left: 0px; width: 1044px; padding-right: 0px; font-family: Consolas, "Courier New", Courier, mono, serif; border-top-width: 0px; border-bottom-width: 0px; font-size: 12px; border-left-width: 0px; padding-top: 1px" class="dp-highlighter bg_csharp"> <div style="padding-bottom: 0px; border-right-width: 0px; margin: 0px; padding-left: 45px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" class="bar"> <div style="border-left: rgb(108,226,108) 3px solid; padding-bottom: 10px; border-right-width: 0px; background-color: rgb(248,248,248); margin: 0px; padding-left: 10px; padding-right: 8px; font: 9px Verdana, Geneva, Arial, Helvetica, sans-serif; border-top-width: 0px; border-bottom-width: 0px; color: silver; padding-top: 3px; font-size-adjust: none; font-stretch: normal" class="tools"><a style="background-image: url(http://static.blog.csdn.net/scripts/SyntaxHighlighter/styles/images/default/ico_plain.gif); padding-bottom: 1px; text-indent: -2000px; margin: 0px 10px 0px 0px; padding-left: 1px; width: 16px; padding-right: 1px; display: inline-block; height: 16px; color: rgb(160,160,160); font-size: 9px; text-decoration: none; padding-top: 1px" class="ViewSource" title="view plain" href="http://blog.csdn.net/jane_sl/article/details/6626025">view plain</a></div> </div> <ol style="padding-bottom: 0px; background-color: rgb(255,255,255); list-style-type: decimal; margin: 0px 0px 1px 45px; padding-left: 0px; padding-right: 0px; color: rgb(92,92,92); padding-top: 0px" class="dp-c"> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">WordApp.Selection.ParagraphFormat.Alignment = </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">Word.WdParagraphAlignment.wdAlignParagraphCenter; </span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">WordApp.Selection.Cells.VerticalAlignment = </span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">Word.WdCellVerticalAlignment.wdCellAlignVerticalCenter;<span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,130,0); padding-top: 0px" class="comment">//选中单元格文字垂直居中</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> </span></span></li> </ol> </div> <p style="padding-bottom: 0px; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px"><br style="padding-bottom: 0px; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" /> 保存Word <div style="padding-bottom: 0px; border-right-width: 0px; overflow-x: auto; overflow-y: auto; background-color: rgb(231,229,220); margin: 18px 0px; padding-left: 0px; width: 1044px; padding-right: 0px; font-family: Consolas, "Courier New", Courier, mono, serif; border-top-width: 0px; border-bottom-width: 0px; font-size: 12px; border-left-width: 0px; padding-top: 1px" class="dp-highlighter bg_csharp"> <div style="padding-bottom: 0px; border-right-width: 0px; margin: 0px; padding-left: 45px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" class="bar"> <div style="border-left: rgb(108,226,108) 3px solid; padding-bottom: 10px; border-right-width: 0px; background-color: rgb(248,248,248); margin: 0px; padding-left: 10px; padding-right: 8px; font: 9px Verdana, Geneva, Arial, Helvetica, sans-serif; border-top-width: 0px; border-bottom-width: 0px; color: silver; padding-top: 3px; font-size-adjust: none; font-stretch: normal" class="tools"><a style="background-image: url(http://static.blog.csdn.net/scripts/SyntaxHighlighter/styles/images/default/ico_plain.gif); padding-bottom: 1px; text-indent: -2000px; margin: 0px 10px 0px 0px; padding-left: 1px; width: 16px; padding-right: 1px; display: inline-block; height: 16px; color: rgb(160,160,160); font-size: 9px; text-decoration: none; padding-top: 1px" class="ViewSource" title="view plain" href="http://blog.csdn.net/jane_sl/article/details/6626025">view plain</a></div> </div> <ol style="padding-bottom: 0px; background-color: rgb(255,255,255); list-style-type: decimal; margin: 0px 0px 1px 45px; padding-left: 0px; padding-right: 0px; color: rgb(92,92,92); padding-top: 0px" class="dp-c"> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">doc.SaveAs(</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> filename,</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> missing ,</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> missing ,</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> missing ,</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> missing,</span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> missing ,</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> missing ,</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> missing ,</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> missing ,</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> missing ,</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> missing ,</span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> missing ,</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> missing ,</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> missing ,</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> missing ,</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> missing ); </span></span></li> </ol> </div> <p style="padding-bottom: 0px; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px"><br style="padding-bottom: 0px; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" /> 结束Word进程 <div style="padding-bottom: 0px; border-right-width: 0px; overflow-x: auto; overflow-y: auto; background-color: rgb(231,229,220); margin: 18px 0px; padding-left: 0px; width: 1044px; padding-right: 0px; font-family: Consolas, "Courier New", Courier, mono, serif; border-top-width: 0px; border-bottom-width: 0px; font-size: 12px; border-left-width: 0px; padding-top: 1px" class="dp-highlighter bg_csharp"> <div style="padding-bottom: 0px; border-right-width: 0px; margin: 0px; padding-left: 45px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" class="bar"> <div style="border-left: rgb(108,226,108) 3px solid; padding-bottom: 10px; border-right-width: 0px; background-color: rgb(248,248,248); margin: 0px; padding-left: 10px; padding-right: 8px; font: 9px Verdana, Geneva, Arial, Helvetica, sans-serif; border-top-width: 0px; border-bottom-width: 0px; color: silver; padding-top: 3px; font-size-adjust: none; font-stretch: normal" class="tools"><a style="background-image: url(http://static.blog.csdn.net/scripts/SyntaxHighlighter/styles/images/default/ico_plain.gif); padding-bottom: 1px; text-indent: -2000px; margin: 0px 10px 0px 0px; padding-left: 1px; width: 16px; padding-right: 1px; display: inline-block; height: 16px; color: rgb(160,160,160); font-size: 9px; text-decoration: none; padding-top: 1px" class="ViewSource" title="view plain" href="http://blog.csdn.net/jane_sl/article/details/6626025">view plain</a></div> </div> <ol style="padding-bottom: 0px; background-color: rgb(255,255,255); list-style-type: decimal; margin: 0px 0px 1px 45px; padding-left: 0px; padding-right: 0px; color: rgb(92,92,92); padding-top: 0px" class="dp-c"> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">myDoc.Close (</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> missing,</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> missing ,</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> missing); </span></span></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(248,248,248); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; color: rgb(92,92,92); border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important"></li> <li style="list-style-position: outside !important; border-bottom-style: none; padding-bottom: 0px !important; line-height: 18px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin-top: 0px !important; border-left-style: solid; padding-left: 10px !important; padding-right: 3px !important; border-top-style: none; margin-bottom: 0px !important; border-right-style: none; border-left-color: rgb(108,226,108); margin-right: 0px !important; padding-top: 0px !important" class="alt"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px">myWord.Quit (<span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> missing,</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> missing ,</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: rgb(0,102,153); font-weight: bold; padding-top: 0px" class="keyword">ref</span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; color: black; padding-top: 0px"> missing );</span></span></li> </ol> </div> </div>
试试其它关键字
操作Word
同语言下
.
文件IO 操作类库
.
Check图片类型[JPEG(.jpg 、.jpeg),TIF,GIF,BMP,PNG,P
.
机器名和IP取得(IPV4 IPV6)
.
Tiff转换Bitmap
.
linqHelper
.
MadieHelper.cs
.
RegHelper.cs
.
如果关闭一个窗体后激活另一个窗体的事件或方法
.
创建日志通用类
.
串口辅助开发类
可能有用的
.
C#实现的html内容截取
.
List 切割成几份 工具类
.
SQL查询 多列合并成一行用逗号隔开
.
一行一行读取txt的内容
.
C#动态修改文件夹名称(FSO实现,不移动文件)
.
c# 移动文件或文件夹
.
c#图片添加水印
.
Java PDF转换成图片并输出给前台展示
.
网站后台修改图片尺寸代码
.
处理大图片在缩略图时的展示
Dezai.CN
贡献的其它代码
(
4037
)
.
多线程Socket服务器模块
.
生成随机密码
.
清除浮动样式
.
弹出窗口居中
.
抓取url的函数
.
使用base HTTP验证
.
div模拟iframe嵌入效果
.
通过header转向的方法
.
Session操作类
.
执行sqlite输入插入操作后获得自动编号的ID
Copyright © 2004 - 2024 dezai.cn. All Rights Reserved
站长博客
粤ICP备13059550号-3