Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2007 - Email as "Body Text" Alistair Excel Discussion (Misc queries) 4 May 16th 07 05:59 PM
Trying to send an email with body text, to a range of cells [email protected] Excel Discussion (Misc queries) 1 November 29th 06 12:28 AM
Email Workseet as Body of email [email protected] Excel Programming 11 December 22nd 05 09:43 PM
Adding text to body of email with workbook attached. aph Excel Programming 3 December 5th 05 03:11 PM
body of email disappears when I send an email from Excel ~A Excel Discussion (Misc queries) 0 February 25th 05 10:55 PM


All times are GMT +1. The time now is 09:30 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"