+ Reply to Thread
Results 1 to 2 of 2

Email Body Text & Signature

  1. #1
    Darrell Lankford
    Guest

    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 = "[email protected]"
    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. #2
    Ron de Bruin
    Guest

    Re: 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" <[email protected]> wrote in message news:[email protected]...
    > 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 = "[email protected]"
    > 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1