随笔分类 -  Aspose.Word

摘要:继上篇:Aspose Word模板使用总结9.创建word模版,使用MergeFeild插入图片10.插入图片示例 string tempPath = Server.MapPath("~/Docs/Temp/Template.doc"); string logoPath = Server.MapPath("~/Content/logo.jpg"); var doc = new Document(tempPath); //载入模板 //提供数据源 String[] fieldNames = new String[] { "logo", 阅读全文
posted @ 2013-05-24 17:17 birchlee 阅读(7455) 评论(19) 推荐(4) 编辑
摘要:1.创建word模版,使用MergeFeild绑定数据 新建一个Word文档,命名为Template.doc 注意:这里并不是输入"《”和“》”就可以了,而是必须在菜单的"插入→文档部件→域”找到MergeField并输入相应的域名2.使用数组提供数据源string tempPath = Server.MapPath("~/Docs/Temp/Template.doc");string outputPath = Server.MapPath("~/Docs/Output/Template.doc");//载入模板var doc = n 阅读全文
posted @ 2013-05-23 12:29 birchlee 阅读(30074) 评论(29) 推荐(11) 编辑