.ENT 生成word 图片怎么插入,在线等待
int collcount = 0;//行数
int collColumn = 0;//列
for (int i = 0; i < allCount; i++)
{
collColumn++;
if ((i % 4) == 0)//4个换行
{
collcount++;
}
#region 绘制表格
////纵向合并单元格
newTable.Cell(collcount, collColumn - ((collcount - 1) * 4)).Select();//选中
string imgUrl = @"D:\titan_oa\TitanOA\media\UGG\women\leather\5116-black_2.jpg";
object linkToFile = false;
object saveWithDcountent = true;
object anchor = Doc.Application.Selection.Range;
Doc.Application.ActiveDocument.InlineShapes.AddPicture(imgUrl, ref linkToFile, ref saveWithDcountent, ref anchor);
Doc.Application.ActiveDocument.InlineShapes[1].Width = 100f;//图片宽
Doc.Application.ActiveDocument.InlineShapes[1].Height = 100f;//图片高
//设置四周环绕
Shape s = Word.Application.ActiveDocument.InlineShapes[1].ConvertToShape();
s.WrapFormat.Type = WdWrapType.wdWrapSquare;
newTable.Cell(collcount, collColumn - ((collcount - 1) * 4)).Range.Text = dt.Rows[i]["ProductAttributeName"].ToString();
newTable.Cell(collcount, collColumn - ((collcount - 1) * 4)).Range.Bold = 2;//设置粗体
Word.Selection.Cells.VerticalAlignment = WdCellVerticalAlignment.wdCellAlignVerticalCenter;//设置垂直居中
Word.Selection.ParagraphFormat.Alignment = WdParagraphAlignment.wdAlignParagraphCenter;//设置水平居中
#endregion
}
#endregion
我把newTable.Cell(collcount, collColumn - ((collcount - 1) * 4)).Select();//选中 去掉就全加到第一个单元格le
要怎么样向每个单元格添加图片.
...全文
相关推荐
用于为Ent模式生成ER图的CLI-Golang开发
一个用于使用mermaid.js为Ent模式生成ER(实体关系)图的CLI。 输入一个CLI,以使用mermaid.js为Ent模式生成ER(实体关系)图。 安装go get -u github.com/a8m/enter示例回车传递自定义架构路径(默认为ent / schema):输入./pkg/ent/schema
动易SiteFactory官方Ent企业模板
动易SiteFactory官方Ent企业模板
ent:ENT-伪随机数序列测试程序
ENT-伪随机数序列测试程序 有关原始程序信息,请参见 原始来源: : 稍微修改makefile以使用cc而不是gcc 有关文档,请参见ent.html 。 在FreeBSD上,使用Port math/ent
enter:用于为Ent模式生成ER图的CLI
进入 一个用于使用为生成的 。 安装 go get -u github.com/a8m/enter 例子 enter 传递自定义架构路径(默认为ent/schema ): enter ./pkg/ent/schema
ilink_ent (BCB6 ent 版本的 ilink 补丁
ilink_ent (BCB6 ent 版本的 ilink 补丁)


