


How to enlarge date type in thunderbird mail mac code#
The code below iterates through a range in excel and for each record marked for sending it will send an email using Thunderbird. Private Function AddAttachments(ByRef strAttachments As String) As Integer '* Add possible attachments to the email message

StrMessageBody = strMessageBody & Signature 'Add to message Open SignatureFile For Input As #1 'Open file for reading Private Function AddSignature(SignatureFile As String, ByRef strMessageBody As String) As Boolean '* Add possible signature to the email message Private Function AddRecipients(Recipients As String, MAPIMailItem As Outlook.MailItem, RecType As Integer) As Integer '* Recipients is a string with one or more email addresses, '* Add recipients, CC or BCC recipients to the email message Shell Cmd & Arg 'Call Thunderbird to send the message StrMessageBody = STARTBODY & strMessageBody & ENDBODY 'Add HTML and CSSĪrg = Arg & "format=" & strTemp & "," 'Format specifier HTML or Plain TextĪrg = Arg & "body='" & strMessageBody & "'," 'Add body textĬall AddSignature(SignatureFile, strMessageBody) 'Add signature if anyĬall AddAttachments(strAttachments,, Arg) 'Add attachment(s) if any If strSubject "" Then Arg = Arg & "subject=" & strSubject & "," If strBCC "" Then Arg = Arg & "bcc='" & strBCC & "'," If strCC "" Then Arg = Arg & "cc='" & strCC & "'," If strTo "" Then Arg = Arg & "to='" & strTo & "'," Optional SignatureFile As String = "") As BooleanĬmd = Environ("THUNDERBIRD_PATH") 'E:\Program Files\Mozilla Thunderbird\thunderbird.exe Optional strAttachments As String = "", _ Optional PlainTextFormat As Boolean = False, _ Rcp = SendMail(Rcp, CC, BCC, "Test", "Hello World", False, ATTACHMENT1 & " " & ATTACHMENT2) '* SetX THUNDERBIRD_PATH "C:\Program Files\Mozilla Thunderbird\thunderbird.exe" Can be run by placing the cursor anywhere within the code and press F5 Private Const ATTACHMENT2 = "C:\Temp\attachment2.pdf" Private Const ATTACHMENT1 = "C:\Temp\attachment1.pdf" Not recently tested but it worked with attachments for Thunderbird. This opened the 'Write' box in thunderbird with all the fields pre-filled out ready to send.įound some old code. If Err.Description "" Then MsgBox Err.Description

ShellExecute 0&, vbNullString, Mail_Object, vbNullString, vbNullString,Īpplication.Wait (Now + TimeValue("0:00:02")) Mail_Object = "mailto:" & Email_Send_To & "?subject=" & Email_Subject & Below is the code I use Private Declare Function ShellExecute Lib "shell32.dll" _Īlias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, _īyVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory Asĭim Email_Subject, Email_Send_To, Email_Cc, Email_Bcc, Email_Body As StringĮmail_Subject = "ACT Form Completed and Confirmed"Įmail_Send_To = "ACT Form Completed and Confirmed Please see attached" I have, however, managed to get the email portion of this to work myself. Looked at a load more articles and tried following what the comments have said but they didn't help.
