插入word文档后如何更改图片的大小
我正在将图片添加到某个书签处的 Word 文档中。但是,图片太大并且迫使文本离开页面,因此我需要能够在图片放入Word文档后更改图片的大小。
I'm adding a picture to a word document at a certain bookmark. However, the picture is too big and is forcing text off the page, so I need to be able to change the size of the picture after it is in the word document.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
当您插入图像时,它应该返回一个 InlineShape,您可以修改它:
When you insert the image, it should return you an InlineShape, which you can modify:
我用来成功调整图片大小的代码是:
看来转换为 Shape 是解决方案。之前直接在InLineShapes中设置不同的高度,产生了错误。
(我刚刚编辑了一篇文章并简化了代码,因此它不再使用第二个dll库:Microsoft.Office.Core)
Code, which I used to resize the picture successfully is:
Seems that convering to Shape is the solution. Previous set the different height directly in InLineShapes, produced an error.
(I just edited a post and simplified the code, so it does not use 2nd dll library: Microsoft.Office.Core anymore)