Outlook中的recepient邮箱中的邮件格式发生了变化

时间:2013-02-27 12:32:53

标签: vbscript outlook format

我已经在vbscript中编写了一些代码,以便使用outlook自动将邮件发送到收件人,一切正常但我只有一个问题,我在邮件收件人的邮箱中选择的邮件正在改变的格式。我使用了font color- blue and font face -calibri but it got changed into Times new roman without any color

任何解决方案?

Set MyApp = CreateObject("Outlook.Application")
    Set MyItem = MyApp.CreateItem(0) 'olMailItem
    With MyItem
            .To = "abc@com"
            .Subject = ""
            .ReadReceiptRequested = False

            .HTMLBody = "<font size='3' face='Calibri' color='#151B54'>Hi,Whatever written here got changed into plain text.<font>"




            .Attachments.Add "C:\Excels\"& objFso.GetFileName(objFile.path)
    End With
    MyItem.Display
    End if

或者是否有任何设置我必须在已发送邮件的前景中更改?

1 个答案:

答案 0 :(得分:0)

这对我来说非常好:

MailItem sendMail = Globals.ThisAddIn.Application.CreateItem(OlItemType.olMailItem);
        sendMail.Subject = "test";
        sendMail.To = SenderName; //or email
        sendMail.HTMLBody = "<font size='50' face='Verdana' color='#ff0000'>Hi,Whatever written here got changed into plain text.<font>";
        sendMail.Send();

当我发送给自己时,我收到了verdana中的大红色文字

请注意,这是c#所以我不确定它是否会对您有所帮助

编辑:

还有一件事:font size ='3'也不适用于我。因为它太小而无法正常显示