惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

美团技术团队
罗磊的独立博客
SecWiki News
SecWiki News
The Register - Security
The Register - Security
The GitHub Blog
The GitHub Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 三生石上(FineUI控件)
S
Schneier on Security
IT之家
IT之家
博客园 - 聂微东
T
The Exploit Database - CXSecurity.com
Recorded Future
Recorded Future
大猫的无限游戏
大猫的无限游戏
Know Your Adversary
Know Your Adversary
Latest news
Latest news
Vercel News
Vercel News
G
GRAHAM CLULEY
D
DataBreaches.Net
D
Darknet – Hacking Tools, Hacker News & Cyber Security
S
SegmentFault 最新的问题
博客园_首页
雷峰网
雷峰网
T
Tenable Blog
Spread Privacy
Spread Privacy
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
酷 壳 – CoolShell
酷 壳 – CoolShell
Cisco Talos Blog
Cisco Talos Blog
V
Visual Studio Blog
J
Java Code Geeks
博客园 - Franky
The Cloudflare Blog
Apple Machine Learning Research
Apple Machine Learning Research
C
CERT Recently Published Vulnerability Notes
T
Threatpost
Google DeepMind News
Google DeepMind News
F
Fortinet All Blogs
P
Privacy International News Feed
T
Threat Research - Cisco Blogs
T
The Blog of Author Tim Ferriss
V
Vulnerabilities – Threatpost
Recent Announcements
Recent Announcements
Blog — PlanetScale
Blog — PlanetScale
Security Latest
Security Latest
U
Unit 42
M
MIT News - Artificial intelligence
Y
Y Combinator Blog
K
Kaspersky official blog
有赞技术团队
有赞技术团队
B
Blog
腾讯CDC

博客园 - YiStudio

DataGridView多列排序 将Word嵌入到自己的程序中 一个非常不错的压缩组件 免费的国产报表Grid++Reprot 使用NSIS制作安装包(2) 使用NSIS制作安装包(1) SharpDevelop2.0 用Firebird .NET Data Provider编写.NET应用程序(2) 用Marathon管理Firebird数据库(2) 用Firebird .NET Data Provider编写.NET应用程序(1) 用Marathon管理Firebird数据库(1) Firebird简介 NDoc修改手记(三) NDoc修改手记(二) NDoc修改手记(一) WebForm中将DataGrid中导出数据的方法 FxCop EXCEL2003中使用XML 动态加载类(动态加载DLL文件)
在Word中插入图片
YiStudio · 2009-12-18 · via 博客园 - YiStudio

    下面的程序片段是将一个图片插入到打开的Word文档中,并让其浮于文字的上面。

代码

1 Word.Document doc=this.msWord1.CurrentDocument;
2 object missing=System.Reflection.Missing.Value;
3 object start=10;
4 object end=20;
5 Word.Range rg=doc.Range(ref start,ref end);
6 object org=(object)rg;
7 Word.InlineShape pic=doc.InlineShapes.AddPicture(@"d:\1.gif",ref missing,ref missing,ref org);
8 Word.Shape sp=pic.ConvertToShape();
9 sp.ZOrder(Microsoft.Office.Core.MsoZOrderCmd.msoBringToFront);

    这里面重要的是Shape对象的ZOrder方法,这个方法的参数是MsoZOrderCmd枚举变量,主要是通过其来控制图片的效果。