社区
VB
VB基础类
帖子详情
lcm115689
2024-01-20 10:42:01
用 vb6.0向word中插入图片,遇到诡异的事情,………addpicture("a_0.jpg"),两个文件都存在,文件名0能成功运行,0改成1就报错,我把两个文件都删除,用0还能正常运行,你说奇怪不奇怪?哪位大神,帮帮我!!!
...全文
275
1
打赏
收藏
用 vb6.0向word中插入图片,遇到诡异的事情,………addpicture("a_0.jpg"),两个文件都存在,文件名0能成功运行,0改成1就报错,我把两个文件都删除,用0还能正常运行,你说奇怪不奇怪?哪位大神,帮帮我!!!
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
1 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
vansoft
02-21
打赏
举报
回复
录个宏看看啊。
为什么
WORD
中
插入的图片都变成空白框了.docx
为什么
WORD
中
插入的图片都变成空白框了.docx
解决POI3.10 添加图片不
成功
的问题
解决POI3.10在添加图片的时候自身有一个BUG。纠结了很久都没解决,今天终于弄好了,
文件
包
中
附带了修改好的jar包bsj-poi-ooxml-3.10-FINAL-20140208.jar。主要问题是出在:org.apache.poi.xwpf.usermodel.XWPFRun.
add
Pic
tu
re()函数 解决的是 // Pesky XmlBeans bug - see Bugzilla #49934 测试代码: HashMap map = new HashMap(); map.put("${name}", "李清清"); map.put("${tel}", "0851-xxxxxx"); map.put("${org}", "信息工程"); map.put("${user
pic
}", new Object[]{"d:\\p1.
jpg
",100,150}); String srcPath = "d:\\1.docx"; String destPath = "d:\\2.docx"; searchAndReplace(srcPath, destPath, map);
word
add
pic
tu
re 环绕方式
打开
word
,添加图片及环绕方式,设置图片大小等
Microsoft.Office.Interop.
Word
.dll
Microsoft.Office.Interop.
Word
.dll 事例如 object Nothing = System.Reflection.Missing.Value; object srcFileName = @"D:\aa.html"; object dstFileName = @"d:\li.doc"; object objt = true;
Word
.Application
word
App = new
Word
.ApplicationClass();
Word
.Document
word
Doc = null; object format =
Word
.WdSaveFormat.wdFormatDocument; try {
word
Doc =
word
App.Documents.Open(ref srcFileName, ref format, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing); //图片
Word
.Shape oShape =
word
Doc.Shapes.
Add
Pic
tu
re("D:\\DL_01.gif", ref Nothing, ref objt, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing); oShape.WrapFormat.Type =
Word
.WdWrapType.wdWrapSquare; //将htm
文件
save as成doc
文件
word
Doc.SaveAs(ref dstFileName, ref format, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing); } finally {
word
Doc.Close(ref Nothing, ref Nothing, ref Nothing);
word
App.Quit(ref Nothing, ref Nothing, ref Nothing); } }
Add
Pic
tu
re.rar_按钮控件_Visual_C++_
一个简单的控件使用方法,利用按钮添加图片
VB
16,554
社区成员
110,527
社区内容
发帖
与我相关
我的任务
VB
VB技术相关讨论,主要为经典vb,即VB6.0
复制链接
扫一扫
分享
社区描述
VB技术相关讨论,主要为经典vb,即VB6.0
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章