Excel Macro sending through Thunderbird [closed]

旧巷老猫 提交于 2019-12-06 02:50:10

Example

Option Explicit
Sub Thunderbird()
    Dim sCmd As String      '// Prepare Thunderbird
    Dim sTo As String       '// Recipient
    Dim sSubject As String  '// Subject
    Dim sBody As String     '// Email body

    sTo = "Test@Email.com"
    sSubject = "Subject"
    sBody = "body text"

    sCmd = "C:\Program Files\Mozilla Thunderbird\thunderbird" '// or
    'sCmd = "C:\Program Files (x86)\Mozilla Thunderbird\thunderbird" '// Path
    sCmd = sCmd & " -compose " & Chr$(34) & "mailto:" & sTo & "?" '// Chr$(34)=double quote
    sCmd = sCmd & "subject=" & Chr$(34) & sSubject & Chr$(34)
    sCmd = sCmd & sBody

    Call Shell(sCmd, vbNormalFocus)
End Sub
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!