在word中通过书签定位,插入图片?
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;
}
我用这个代码,图片能插入,但是效果不好,会移位。有什么解决的办法吗