Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
send email to each customer email in excel sheet. | Excel Discussion (Misc queries) | |||
Email addresses in Excel need to format for mass email | Excel Worksheet Functions | |||
Email editor closes when forwarding Excel-embedded email | Setting up and Configuration of Excel | |||
working on excel document in email saved changes in email not in . | Excel Discussion (Misc queries) | |||
Outlook AutoSignature | Excel Programming |