中科院IT工程硕士 为IT人加油超经典全套java ee教程免费下载!6月PHP就业班开班在即先实习后上岗,入职年薪5-10万 世界杯竞猜setTimeout与setInterval在不同浏览器下的差异发布Java写的俄罗斯方块源码 算法简单(300行) 注释详细C#编码猜谜,送可用分 Google 提供的广告谷歌关键字广告免费试用高达1000元免费广告费等你拿,1分钟注册,马上获得优惠券!
AdWords.google.com

解决方案 »

  1.   

    using Word = Microsoft.Office.Interop.Word;
     Microsoft.Office.Interop.Word._Document Doc = app.Documents.Open(ref sFile, ref optional, ref docreadonly, ref optional, ref optional, ref optional, ref optional, ref optional, ref optional, ref optional, ref optional, ref visible, ref optional, ref optional, ref optional, ref optional);
    使用书签或自添加table
    if (Doc.Books.Exists("a"))
     {
                        object WdLine = Word.WdUnits.wdLine;
                        object oEndOfDoc = "a";
                        Word.Range oRng = Doc.Books.get_Item(ref oEndOfDoc).Range;
                        Word.Table tb = Doc.Tables.Add(oRng, 1, 2, ref nothing, ref nothing);
                        tb.Rows.Alignment = Word.WdRowAlignment.wdAlignRowCenter;
                        tb.Borders.OutsideLineStyle = Word.WdLineStyle.wdLineStyleSingle;
                        tb.Borders.InsideLineStyle = Word.WdLineStyle.wdLineStyleSingle;                    int i = 1;
                        tb.Cell(1, 1).Range.Text = "";
                        tb.Cell(1, 2).Range.Text = "";
    }