C# word中插入图片aaaa

lyyttcc 2010-08-23 03:34:08
不知道怎么插入啊??
...全文
86 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
q107770540 2010-08-23
  • 打赏
  • 举报
回复
哥怎么感觉LS两位在玩 倒分游戏?
q107770540 2010-08-23
  • 打赏
  • 举报
回复

//插入图片
if (this.openfiledialog1.showdialog() == dialogresult.ok)
{
string filename0 = openfiledialog1.filename;
object filename1 = openfiledialog1.filename;
object readonly = false;
object isvisible = true;

object missing = system.reflection.missing.value;

word.applicationclass wordapp=new word.applicationclass();
wordapp.visible = true;



//打开word文档
word.document adoc = wordapp.documents.open(ref filename1, ref missing,ref readonly,
ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref isvisible);


adoc.activate();

//插入图片


object a=true;
object b=true;
//定义位置
object left=100;object top=150;
object width=400;
object height=450;

adoc.shapes.addpicture("f:\\1.jpg",ref a,ref b,ref left,ref top,ref width,ref height,ref missing);
adoc.save();
adoc.close(ref missing,ref missing,ref missing);
wordapp.quit(ref a,ref missing,ref missing);

}
lyyttcc202 2010-08-23
  • 打赏
  • 举报
回复
设置个书签,在书签位置插入

7,765

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 非技术区
社区管理员
  • 非技术区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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