使用 VBA 和 CDO 邮件对象通过 SMS 将向上箭头 `↑` 字符发送到 iPhone

Send up arrow `↑` character to iPhone with SMS using VBA and a CDO mail object

我需要使用 VBA 和 CDO 邮件对象将向上箭头 发送到 iPhone。

我的尝试如下:

Unicode:

subj =  ChrW(8593) & " Up " & ChrW(8593)

HTML:

subj =  "↑ Up ↑"

上述两种方法都会导致 iPhone 接收 Unicode 的 ? Up ?↑ Up ↑ 作为字符串文字。

有谁知道向上箭头的正确语法

解法:

我正在寻找一些 'special character' 语法,但问题不在于消息的构造。我需要将 .BodyPart.Charset = "utf-8" 添加到 CDO.Message 对象并在我需要的地方使用 Unicode Chrw(8593)

Sub sendMSSG(sbj As String, mssg As String)
    Dim cdoMail As New CDO.Message
    On Error GoTo err_Report

    With cdoMail
        With .Configuration.Fields
            .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPort '2
            .Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True
            .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465
            .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "my.smtpserverserver.net"
            .Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = cdoBasic  '1
            .Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True
            .Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = sFROM
            .Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = sFROMPWD
            .Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 6
            .Update
        End With
        .BodyPart.Charset = "utf-8"     '<~~ THIS WAS REQUIRED
        .Subject = sbj
        .From = sFROM
        .To = sPHONEMSSGNO
        .Bcc = vbNullString
        .Cc = vbNullString
        .TextBody = mssg
        .Send
    End With

    Exit Sub

err_Report:
    Debug.Print Err.Number & ": " & Err.Description

End Sub

显然,.BodyPart.Charset 涵盖了主题和邮件正文,因为我能够在两者中使用 unicode。


任何计划将此代码用于自己目的的人都需要通过工具将 Microsoft CDO for Windows 2000 library 添加到他们的项目中,参考.