[英]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.