如何将放置在excel中的图像嵌入到vbascript的.html中 [英] How to embed image placed inside the excel into the .htmlbody of vbascript
本文介绍了如何将放置在excel中的图像嵌入到vbascript的.html中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是我的.htmlbody的代码
This is my code of the .htmlbody
.htmlBody="<html><center><img src='https://website.com/images/logo-small.png'></center></html>"
但是,需要下载才能看到徽标。所以我将徽标放在excel文件中,如何将它转换成形状对象,并将其连接到.htmlbody
However, it needs to be downloaded before you can see the logo. So I put the logo inside the excel file, how do I convert it into an shape object and concatenate it inside the .htmlbody
推荐答案
使用电子邮件的附件属性将照片附加到电子邮件中。
Use the attachment property of the email to attach the picture to the email.
然后使用前面的引用电子邮件中的图片。
像这样:
Then reference the picture in your email with a preceding .\
like so:
.htmlBody="<html><center><img src='.\logo-small.png'></center></html>"
.Attachments.Add "C:\yourPath\logo-small.png"
这篇关于如何将放置在excel中的图像嵌入到vbascript的.html中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文