我想知道是否有人知道如何在Excel中构建宏来通过Thunderbird发送电子表格。
答案 0 :(得分:2)
实施例
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