[C#]用C#动态生成Word文档并将数据填入Word表格中(续)
2007-04-25 15:56
816 查看
再补充一些关于C#动态生成Word文档的操作
WordDoc.PageSetup.Orientation = Word.WdOrientation.wdOrientLandscape;//页面设置为横向
WordApp.Selection.ParagraphFormat.SpaceAfter = 10f;//段后距离
WordApp.Selection.TypeText("产品材料表");//在光标处写入信息
//插入图片 方法2
string FileName = Picture;
object LinkToFile = false;
object SaveWithDocument = true;
object Anchor = WordDoc.Tables[1].Cell(7, p).Range;//设置插入位置 // WordDoc.Application.Selection.Range;
object Left = 5;
object Top = 5;
object Width = 90;
object Height = 90;
WordDoc.Application.ActiveDocument.Shapes.AddPicture(FileName, ref LinkToFile, ref SaveWithDocument,ref Left,ref Top,ref Width,ref Height, ref Anchor);
WordDoc.PageSetup.Orientation = Word.WdOrientation.wdOrientLandscape;//页面设置为横向
WordApp.Selection.ParagraphFormat.SpaceAfter = 10f;//段后距离
WordApp.Selection.TypeText("产品材料表");//在光标处写入信息
//插入图片 方法2
string FileName = Picture;
object LinkToFile = false;
object SaveWithDocument = true;
object Anchor = WordDoc.Tables[1].Cell(7, p).Range;//设置插入位置 // WordDoc.Application.Selection.Range;
object Left = 5;
object Top = 5;
object Width = 90;
object Height = 90;
WordDoc.Application.ActiveDocument.Shapes.AddPicture(FileName, ref LinkToFile, ref SaveWithDocument,ref Left,ref Top,ref Width,ref Height, ref Anchor);
相关文章推荐
- 用C#动态生成Word文档并将数据填入Word表格中
- [C#]用C#动态生成Word文档并将数据填入Word表格中
- 用C#动态生成Word文档并将数据填入Word表格中
- 用C#实现动态生成Word文档,在Word文档中插入表格,并将读出的数据填入到表格中
- 用C#动态生成Word文档并将数据填入Word表格中
- [C#]用C#动态生成Word文档并将数据填入Word表格中
- C#动态生成Word文档并填充数据
- 【转载自某园友】用Aspose.Words for .NET动态生成word文档中的数据表格
- C#动态生成Word文档并填充数据
- C#:简单实现动态数据生成Word文档并保存
- C#也能动态生成Word文档并填充数据
- C#也能动态生成Word文档并填充数据
- C#:简单实现动态数据生成Word文档并保存
- C#动态生成”Word文档“并填充数据
- 利用freemarker 在模板里面写入动态数据,动态表格,图片插入并生成word文档
- C#动态生成Word文档并填充数据(ZT)
- C#也能动态生成Word文档并填充数据
- 用Aspose.Words for .NET动态生成word文档中的数据表格
- 利用freemarker 在模板里面写入动态数据,动态表格,图片插入并生成word文档