raymond_vila12
New Member
- Joined
- Oct 13, 2015
- Messages
- 7
The picture in my current macro can be shown in the link below.
https://drive.google.com/open?id=1d4t2_k55WMWZTCGZe47b9sWwy6EOfTmP
Here is my code.
Code:
Function GetBoiler(ByVal sFile As String) As String
Dim fso As Object
Dim ts As Object
Set fso = CreateObject("Scripting.FileSystemObject")
Set ts = fso.GetFile(sFile).OpenAsTextStream(1, -2)
GetBoiler = ts.readall
ts.Close
End Function
Sub MailSajorRecon()
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
SigString = Environ("appdata") & _
"\Microsoft\Signatures\Signature2.htm"
If Dir(SigString) <> "" Then
Signature = GetBoiler(SigString)
Else
Signature = ""
End If
On Error Resume Next
With OutMail
.to = Range("F2").Value
.CC = ""
.BCC = ""
.Subject = Range("F5").Value
.HTMLBody = Range("F6").Value & "
" & Signature
.Attachments.Add (Range("F8").Value)
.Display
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
End Sub
Thanks in advance for anyone who can help.