Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I figured it out.
SigString = "C:\Documents and Settings\" & Environ("username") & _ "\Application Data\Microsoft\Signatures\Sig.txt" If Dir(SigString) < "" Then Signature = GetBoiler(SigString) Else Signature = "" End If Set oOMail = oOApp.CreateItem(olMailItem) With oOMail '.Display .To = eTo .CC = ecc .Subject = eSubject .Body = vbNewLine & vbNewLine & eBody & vbNewLine & Signature .Attachments.Add eAttach, olByValue, 1 .Send End With Set oOMail = Nothing 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel VBA macro to send email attachment from default email client | Excel Programming | |||
Excel Function for Checking Email Syntax | Excel Programming | |||
email from Excel using If function | Excel Worksheet Functions | |||
Email editor closes when forwarding Excel-embedded email | Setting up and Configuration of Excel | |||
Add mailto (email) as function to a button in excel | Excel Worksheet Functions |