怎么把图片插入到Word.Document里面去 使用Application.Selection.InlineShapes.AddPicture(filePath,false,true,Missing.Value) 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 protected void getPhoto(string personId,ref PTSWord.Range range) { object LinkToFile = false,SaveWithDocument = true; object Range = System.Reflection.Missing.Value; PTSWord.InlineShape inLineShape; String fileName = String.Empty; fileName = PhotoPath + "\\" + personId + ".jpg"; try { range.Text = ""; inLineShape = range.InlineShapes.AddPicture(fileName,ref LinkToFile,ref SaveWithDocument,ref Range); inLineShape.Width = 80; inLineShape.Height = 103; } catch(Exception e) { Console.WriteLine(e.Message); this.IsExit = true; } return ; } 数组与事件 C# EXE 描述/公司更改 如何在文件中查询数据? c#做图书管理系统的借出时间问题? 请问到哪里能下到O/RMapping框架,还有自动生成代码工具,要免费的免注册的? 请思归,孟子,速马等大侠给解惑一下,帮顶者有分 请问C#中的映射是什么! 用c#怎么吧数据导入Excel 中 谁知道用什么软件可以将JEPG转化成WORD?很抱歉在这里提出这个问题! 如何让timer在每天的固定时刻执行一个事件?在线等待 有谁知道水晶报表的注册码和密码? 两个FORM窗体变量的相互调用问题
{
object LinkToFile = false,SaveWithDocument = true;
object Range = System.Reflection.Missing.Value;
PTSWord.InlineShape inLineShape;
String fileName = String.Empty;
fileName = PhotoPath + "\\" + personId + ".jpg";
try
{
range.Text = "";
inLineShape = range.InlineShapes.AddPicture(fileName,ref LinkToFile,ref SaveWithDocument,ref Range);
inLineShape.Width = 80;
inLineShape.Height = 103;
}
catch(Exception e)
{
Console.WriteLine(e.Message);
this.IsExit = true;
}
return ;
}