在word中通过书签定位,插入图片?

wzllin 2012-06-08 10:44:49
object NameBookMark = "shr";
object rng = winWordControl1.document.Bookmarks.Item(ref NameBookMark).Range;
if(File.Exists(PicturePath + shr + ".bmp"))
{
il = winWordControl1.document.InlineShapes.AddPicture(PicturePath + shr + ".bmp", ref Linktofile, ref savewithdocument, ref rng);
il.ConvertToShape().ZOrder(Office.MsoZOrderCmd.msoBringInFrontOfText);
il.Width = 92;
il.Height = 28;
}


我用这个代码,图片能插入,但是效果不好,会移位。有什么解决的办法吗
...全文
153 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

111,126

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Creator Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧