源码资源

 word 

C# 在word文档中复制表格并粘帖到下一页中

object oMissing = System.Reflection.Missing.Value;
            Microsoft.Office.Interop.Word._Application oWord;
            Microsoft.Office.Interop.Word._Document oDoc;
            oWord = new Microsoft.Office.Interop.Word.Application();
            //显示word文档
            oWord.Visible = true;
            //取得word文件模板
            object fileName = System.Windows.Forms.Application.StartupPath + "\\word.doc";
            //根据模板生成一个新文档,相当于另存为
            oDoc = oWord.Documents.Add(ref fileName, ref oMissing,
                            ref oMissing, ref oMissing);

            //复制第一个表格
            oDoc.Tables[1].Select();
            oWord.Selection.Copy();

            //在这里操作表格中的文本
            oDoc.Tables[1].Cell(1, 1).Range.Text = "这是第一个表格";

            //下一页
            object mymissing = System.Reflection.Missing.Value;
            object myunit = Microsoft.Office.Interop.Word.WdUnits.wdStory;
            oWord.Selection.EndKey(ref myunit, ref mymissing);
            object pBreak = (int)Microsoft.Office.Interop.Word.WdBreakType.wdPageBreak;
            oWord.Selection.InsertBreak(ref pBreak);

            //粘贴第一个表格
            oWord.Selection.Paste();

            oDoc.Tables[2].Cell(1, 1).Range.Text = "这是第二个表格";

---------------------------------------------------------------------------------------------------------

C#读取WORD时发生“拒绝访问”及“消息筛选器显示应用程序正在使用中”异常...

http://social.msdn.microsoft.com/Forums/zh-CN/236/thread/5996033b-659e-4fe2-a8a3-587af008845e

http://www.microsoft.com/download/en/details.aspx?id=5124

----------------------------------------------------------------------------------------------------------

TestDriven.NET-2.7.2111_Personal

http://download.csdn.net/detail/kittyjie/202905 

 http://download.csdn.net/download/liaoxueping/2543183   《NET设计规范》

 

http://download.csdn.net/download/winslow/3994930   漂亮的抽奖C#源代码(WriteXML,Ini File)

 http://topic.csdn.net/t/20030904/12/2222747.html  触发器问题

http://bbs.bccn.net/thread-343766-1-1.html

create trigger Trigger_Name on Sub_Table
for insert, update
as
if exists ( select * from inserted i
            inner join Main_Table m on i.Mid = m.Mid
              where i.TaxRate <> m.TaxRate)

begin
raiserror('税率不相同',18,18)
rollback tran
end
go
工作、学习是一种心态,不求一日千里,但求循序渐进。

http://blog.csdn.net/lanpeng/article/details/1861435

Selection.ShapeRange.Rotation = 90#


                        //插入分页
                        if (i != DT.Rows.Count - 1)
                        {
                            object mymissing = System.Reflection.Missing.Value;
                            object myunit = Word.WdUnits.wdStory;
                            wordApp.Selection.EndKey(ref myunit, ref mymissing);


                            object pBreak = (int)Word.WdBreakType.wdPageBreak;
                            wordApp.Selection.InsertBreak(ref pBreak);
                        }

object missingValue = Type.Missing;
                object autoFitBehavior = Word.WdAutoFitBehavior.wdAutoFitWindow;
                wordDoc.Tables.Add(wordApp.Selection.Range, 13, 6, ref missingValue, ref autoFitBehavior);

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值