Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Email Body Text & Signature
I'm having a problem with my code putting both the email text and the
signature in an Outlook email. If I change any of the .Body, .Display, or objsigMail it either puts in the text and not the signature, the signature and not the text, or opens 2 separate emails with one of each. If anyone can tell be how to fix it so both the message and the signature will go into the Body of the email, it would be greatly appreciated. Thanks, Darrell Sub email() Dim objOL As New Outlook.Application Dim objMail As MailItem Set objOL = New Outlook.Application Set objMail = objOL.CreateItem(olMailItem) Dim msg As String Set objsigMail = objOL.CreateItem(olMailItem) MTL_1 = Range("Material_List_1").Value MTL_2 = Range("Material_List_2").Value MTL_3 = Range("Material_List_3").Value MTL_4 = Range("Material_List_4").Value MTL_5 = Range("Material_List_5").Value MTL_6 = Range("Material_List_6").Value MTL_7 = Range("Material_List_7").Value MTL_8 = Range("Material_List_8").Value MTL_9 = Range("Material_List_9").Value MTL_10 = Range("Material_List_10").Value SUBJ = Range("Subject").Value msg = "Lester," & Chr(13) & Chr(13) msg = msg & "I need a quote or cost point print out for the following:" & Chr(13) & Chr(13) msg = msg & "Thanks," & Chr(13) msg = msg & " Darrell" & Chr(13) & Chr(13) msg = msg & MTL_1 & Chr(13) msg = msg & MTL_2 & Chr(13) msg = msg & MTL_3 & Chr(13) msg = msg & MTL_4 & Chr(13) msg = msg & MTL_5 & Chr(13) msg = msg & MTL_6 & Chr(13) msg = msg & MTL_7 & Chr(13) msg = msg & MTL_8 & Chr(13) msg = msg & MTL_9 & Chr(13) msg = msg & MTL_10 & Chr(13) addee = " CC = "JAndrews@ Company.com;BarryA@ Company.com" With objMail objsigMail.To = addee objsigMail.CC = CC objsigMail.BCC = "" objsigMail.Subject = SUBJ .Body = msg & objsigMail.Display End With Set objMail = Nothing Set objOL = Nothing End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Email Body Text & Signature
Hi Darrall
See http://www.rondebruin.nl/mail/folder3/signature.htm -- Regards Ron de Bruin http://www.rondebruin.nl "Darrell Lankford" wrote in message oups.com... I'm having a problem with my code putting both the email text and the signature in an Outlook email. If I change any of the .Body, .Display, or objsigMail it either puts in the text and not the signature, the signature and not the text, or opens 2 separate emails with one of each. If anyone can tell be how to fix it so both the message and the signature will go into the Body of the email, it would be greatly appreciated. Thanks, Darrell Sub email() Dim objOL As New Outlook.Application Dim objMail As MailItem Set objOL = New Outlook.Application Set objMail = objOL.CreateItem(olMailItem) Dim msg As String Set objsigMail = objOL.CreateItem(olMailItem) MTL_1 = Range("Material_List_1").Value MTL_2 = Range("Material_List_2").Value MTL_3 = Range("Material_List_3").Value MTL_4 = Range("Material_List_4").Value MTL_5 = Range("Material_List_5").Value MTL_6 = Range("Material_List_6").Value MTL_7 = Range("Material_List_7").Value MTL_8 = Range("Material_List_8").Value MTL_9 = Range("Material_List_9").Value MTL_10 = Range("Material_List_10").Value SUBJ = Range("Subject").Value msg = "Lester," & Chr(13) & Chr(13) msg = msg & "I need a quote or cost point print out for the following:" & Chr(13) & Chr(13) msg = msg & "Thanks," & Chr(13) msg = msg & " Darrell" & Chr(13) & Chr(13) msg = msg & MTL_1 & Chr(13) msg = msg & MTL_2 & Chr(13) msg = msg & MTL_3 & Chr(13) msg = msg & MTL_4 & Chr(13) msg = msg & MTL_5 & Chr(13) msg = msg & MTL_6 & Chr(13) msg = msg & MTL_7 & Chr(13) msg = msg & MTL_8 & Chr(13) msg = msg & MTL_9 & Chr(13) msg = msg & MTL_10 & Chr(13) addee = " CC = "JAndrews@ Company.com;BarryA@ Company.com" With objMail objsigMail.To = addee objsigMail.CC = CC objsigMail.BCC = "" objsigMail.Subject = SUBJ .Body = msg & objsigMail.Display End With Set objMail = Nothing Set objOL = Nothing End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2007 - Email as "Body Text" | Excel Discussion (Misc queries) | |||
Trying to send an email with body text, to a range of cells | Excel Discussion (Misc queries) | |||
Email Workseet as Body of email | Excel Programming | |||
Adding text to body of email with workbook attached. | Excel Programming | |||
body of email disappears when I send an email from Excel | Excel Discussion (Misc queries) |