gpt4 book ai didi

vba - 通过 Thunderbird 发送 Excel 宏

转载 作者:行者123 更新时间:2023-12-02 19:46:26 26 4
gpt4 key购买 nike

我想知道是否有人知道如何在 Excel 中构建宏以通过 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 = "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

关于vba - 通过 Thunderbird 发送 Excel 宏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31283948/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com