word
C# 在word文档中复制表格并粘帖到下一页中
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.youkuaiyun.com/detail/kittyjie/202905
http://download.youkuaiyun.com/download/liaoxueping/2543183 《NET设计规范》
http://download.youkuaiyun.com/download/winslow/3994930 漂亮的抽奖C#源代码(WriteXML,Ini File)
http://topic.youkuaiyun.com/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.youkuaiyun.com/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);