本文介绍了Excel宏通过Thunderbird发送的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想知道有没有人知道如何在excel中构建一个宏,通过Thunderbird发送电子表格。
I was wondering if anyone knew how to build a macro in excel to send the spreadsheet through Thunderbird.
推荐答案
示例
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 = "[email protected]"
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
这篇关于Excel宏通过Thunderbird发送的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!