![]() |
Email from Excel....autosignature?
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 |
Email from Excel....autosignature?
Hi Steve
Not possible as far as I know. You can add it in the Body if you want -- Regards Ron de Bruin http://www.rondebruin.nl "Steve" wrote in message ... 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 |
All times are GMT +1. The time now is 03:58 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com