Excel Macro sending through Thunderbird [closed]

微笑、不失礼 提交于 2019-12-22 10:27:25

问题


I was wondering if anyone knew how to build a macro in excel to send the spreadsheet through Thunderbird.


回答1:


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


来源:https://stackoverflow.com/questions/31283948/excel-macro-sending-through-thunderbird

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