用于在文本电子邮件中进行颜色引用的VBA脚本 [英] VBA script to color quoting in text emails
问题描述
我收到很多使用"互联网风格引用"的电子邮件,在行前面加上一个或几个">"。 我想使用VBA为引用设置颜色,如下图所示:
I receive quite a lot of email that use "internet style quoting", prefixing lines with one or several ">". I would like to use VBA to color the citations as shown in the following picture:
https:// i.stack.imgur.com/BA2dv.png
https:// i.stack.imgur.com/BA2dv.png
是否可能,如果是的话,这样的脚本可以在某处使用(我没有VBA经验)。
Is it possible and, if so, is such script available somewhere (I have no experience with VBA).
推荐答案
Hello Chris,
Hello Chris,
您可以通过编程方式对邮件正文执行任何操作, HTMLBody 属性返回 a String 代表输入
指定项目的HTML正文。因此,您可以根据用户输入的前缀更改文本颜色。
You can do whatever you need with the message body programmatically, the HTMLBody property of the MailItem class returns a String representing the HTML body of the specified item. So, you can change the text color according to prefixes entered by the user.
这篇关于用于在文本电子邮件中进行颜色引用的VBA脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!