Email from Excel....autosignature?

S

Steve

email from excel... autosignature?

Code below will launch an outlook mail message (Outlook 97, not
Outlook Express), and attach the active workbook and other files as
chosen by the user.

My only prob is the generated mail message does not include my
autosignature, whereas normally creating a new mail message directly
in outlook will automatically place the autosignature on the email.

Any ideas on how to get my autosignature to appear on new emails using
code?

tia
steve

Sub sendPack()

Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(olMailItem)

Dim VI As String
Dim d As String
Dim esa As String
Dim sendTo As String


VI = ActiveSheet.Range("b6").Value
d = ActiveSheet.Range("d6").Value
esa = ActiveSheet.Range("f6").Value
sendTo = "! NDCG Damage Packs"

rslt = MsgBox("Would you like to attach am Invoice or Plan?",
vbYesNo, "Attach File to Email")
Select Case rslt
Case vbYes
Dim sFileName As String

Dim sFname As Variant
Dim i As Long

sFname = Application.GetOpenFilename( _
FileFilter:="All Files, *.*, Excel Files, *.xl*;*.xls;*.xlt",
_
FilterIndex:=2, _
MultiSelect:=True)

Case vbNo
MsgBox "No files selected"
End Select

With OutMail
.To = sendTo
'.CC = " "
'.BCC =
.Subject = VI & ", Damage " & d & ", " & esa & " exch"
.Body = " "

If IsArray(sFname) Then
For i = LBound(sFname) To UBound(sFname)
.Attachments.Add sFname(i)

Next i
End If


.Attachments.Add ActiveWorkbook.Path & "\" &
ActiveWorkbook.Name
.Display
'.Send

Set OutMail = Nothing
Set OutApp = Nothing

End With

End Sub
 
R

Ron de Bruin

Hi Steve

Not possible as far as I know.
You can add it in the Body if you want
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top