2017-05-12 3 views
7

VBAとCDOメールオブジェクトを使用してSMSに上矢印をiPhoneに送信する必要があります。次のようにVBAとCDOメールオブジェクトを使用してSMSで矢印 `↑`をSMSに送信

私の試みがある:

ユニコード:

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

HTML:上記の方法のどちらもため? Up ?のいずれかを受信するiPhoneもたらす

subj = "↑ Up ↑" 

Unicodeまたは↑ Up ↑を文字列リテラルとして返します。

誰かが上向き矢印の正しい構文を知っていますか?

+1

[Oliver Queen](http://www.imdb.com/character/ch0028557/?ref_=tt_cl_t1)をSMSで送信しますか? – ThunderFrame

+0

これは 'StrConv'呼び出しを必要としませんか? –

+0

笑;私は彼の震えが↑文字のために解決するので、SMTPポートでキャッチされるかもしれないと思います。 – Jeeped

答えて

7

ソリューション:

私はいくつかの特別な文字 '構文を探していましたが、問題は、メッセージの建設ではありませんでした。私は.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 

Iの両方でUnicodeを使用することができたとして明らかに、.BodyPart.Charsetは、対象とメッセージ本体の両方を覆います。独自の目的のためにこのコードを使用することを計画し


誰もがツール、参考資料を経由して自分のプロジェクトにWindows 2000のライブラリためのMicrosoft CDOを追加する必要があります。

関連する問題