问题
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