gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-03 18:35:46 27 4
gpt4 key购买 nike

我需要使用 VBA 和 CDO 邮件对象通过 SMS 向 iPhone 发送向上箭头

我的尝试如下:

统一码:

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

HTML:

subj =  "↑ Up ↑"

上述两种方法都会导致 iPhone 收到 ? Up ? 表示 Unicode 或 ↑ Up ↑ 作为字符串文字。

有人知道向上箭头 的正确语法吗?

最佳答案

解决方案:

我正在寻找一些“特殊字符”语法,但问题不在于消息的构造。我需要将 .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 库添加到他们的项目中。

关于iphone - 使用 VBA 和 CDO 邮件对象通过 SMS 将向上箭头 `↑` 字符发送到 iPhone,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43927471/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com