Send `↑` arrow to character on iPhone via SMS using VBA and CDO mail object

I need to send the up arrow to iPhone using SMS using VBA and CDO mail object.

My attempts:

Unicode:

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

HTML:

 subj = "↑ Up ↑" 

Both of the above methods result in iPhone getting either ? Up ? ? Up ? for Unicode, or ↑ Up ↑ ↑ Up ↑ like a string literal.

Does anyone know the correct syntax for the up arrow?

+7
vba iphone utf-8 sms
source share
1 answer

Decision:

I was looking for the syntax of a special character, but the problem was not building the message. I needed to add .BodyPart.Charset = "utf-8" to the CDO.Message object and use Unicode Chrw(8593) where I need it.

 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 

Apparently .BodyPart.Charset covers both the object and the body of the message, since I could use unicode in both.


Anyone who plans to use this code for their own purposes should add Microsoft CDO for the Windows 2000 library to their project using tools, links.

+7
source share

All Articles