Access VBA中邮件正文的VBA字符编码

时间:2014-11-10 19:46:18

标签: character-encoding access-vba ms-access-2007

在Access VBA中,您在哪里设置电子邮件中正文的编码? 我使用文本框来编写文本正文,所有非西方字母都被更改,我猜输入是以centraleuropean编码,邮件是用西方编码发送的。

Set cdomsg = CreateObject("CDO.message")
With cdomsg.Configuration.Fields
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'NTLM method
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "mail.intranet.myserver.si"
.Item("http://schemas.microsoft.com/cdo/configuration/smptserverport") = 25
.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False
.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
.Update
End With


With cdomsg
    .To = recipients
    .FROM = "Me  <mymail@myserver.si>"
    .Subject = me.tSubject
    .TextBody = me.tMsg
    .Attachments.DeleteAll
    .AddAttachment strpath
    .send
End With

0 个答案:

没有答案