如何使用Excel宏更改Outlook邮件的页面颜色 [英] How to change the Page Color of Outlook message using Excel Macro

查看:139
本文介绍了如何使用Excel宏更改Outlook邮件的页面颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我想从Microsoft Outlook(2010)发送电子邮件。为此,我有一个VBA项目,我在其中创建一个Outlook Mail对象:



'初始化Outlook应用程序对象

Set outlookApp =新的Outlook.Application

'初始化Outlook CreateItem对象用于创建规则

设置outlookMail = outlookApp.CreateItem(olMailItem)



'根据文本框中提供的输入撰写邮件。

使用outlookMail

.To ='xyz@xyz.com'

.Subject = mailSubjectRule

.Body =表格(输入)。txtboxMailBody.Text





请有人告诉我是否可以使用上面的代码更改Outlook的页面颜色消息,即设置outlookMailobject的任何属性。



我需要设置展望消息的背景。



谢谢

Nishant

Hi,

I want to send email messages from Microsoft Outlook(2010). For this I have a VBA project, in which I'm creating an Outlook Mail object as:

'Initialize Outlook Application Object
Set outlookApp = New Outlook.Application
'Initialize Outlook CreateItem object for creating rule
Set outlookMail = outlookApp.CreateItem(olMailItem)

'Compose mail based on the inputs provided in the text boxes.
With outlookMail
.To = 'xyz@xyz.com'
.Subject = mailSubjectRule
.Body = Sheets("Input").txtboxMailBody.Text


Please somebody tell me if I can change the Page Color of Outlook message using the above code, i.e. setting any property of outlookMailobject.

I need to set the background of outlook message.

Thanks
Nishant

推荐答案

我'我很确定这样做的唯一方法是f将邮件命名为HTML或RTF,并将邮件嵌入适当的标记中。 HTML可能是两者中最可靠的。
I'm pretty certain that the only way to do this is to format the message as HTML or RTF and embed your message in appropriate tags. HTML is probably the most reliable of the two.


这篇关于如何使用Excel宏更改Outlook邮件的页面颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆