[英]How can i move image in ms word using c#
我想用图像替换mergefiled,我做到了。 现在我想将图像向上移动一点,就像在ms word中使用鼠标一样。 我怎样才能做到这一点? 这是我的代码。
//hash = values for find, field = mergefields in word document
foreach (string s in hash.Keys)//if (hash key == field)
{
hashVal = hash[s].ToString();
Find findObj = app.Selection.Find;
findObj.ClearFormatting();
findObj.Text = frontM + fdName + backM; //=mergeField
if (findObj.Text.Equals(frontM + s + backM))
{
merge.Select();
app.Selection.TypeBackspace();
word.InlineShapes.AddPicture(hashVal, true, false, app.Selection.Range).ConvertToShape().WrapFormat.Type = WdWrapType.wdWrapFront;
//app.Selection.MoveUp(); ????????
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.