需要用Excel图表替换word文档中的图像

发布于 2024-08-25 01:35:48 字数 88 浏览 3 评论 0原文

有没有简单的方法可以使用VB将word文档中的图像替换为Excel图表,并保留所有格式细节,例如图像框架样式、文本换行、锚点等(因此图像只是模板中的占位符)文档)

is there any simple way to replace an image inside word-document with an excel chart using VB and preserving all of the format details such as image frame style, text wrap, anchor, etc. (thus the image is just a placeholder in a template document)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

幻梦 2024-09-01 01:35:48

如果我是对的 - 没有合适的方法来替换图像。所以我替换了自动形状背景


图表(chart_name).导出路径 + "chart.gif", "GIF"
word_app.ActiveDocument.Shapes(autoshape_name).Fill.UserPicture 路径 + "chart.gif"

...仍然无法从 MS Word UI 设置“autoshape_name”。
所以我必须为它编写额外的宏。这很烦人

if i'm right - there is no decent way to replace an image. so i've replaced autoshape background


Charts(chart_name).Export path + "chart.gif", "GIF"
word_app.ActiveDocument.Shapes(autoshape_name).Fill.UserPicture path + "chart.gif"

...still, there is no way to set "autoshape_name" from MS Word UI.
so i must write additional macros for it. that's annoying

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文