+ Reply to Thread
Results 1 to 4 of 4

Automatic E-mail - include signature including formatting and Image

Hybrid View

RichTea88 Automatic E-mail - include... 11-19-2013, 09:22 AM
RichTea88 Re: Automatic E-mail -... 11-19-2013, 09:41 AM
RichTea88 Re: Automatic E-mail -... 11-19-2013, 09:58 AM
RichTea88 Re: Automatic E-mail -... 11-19-2013, 10:11 AM
  1. #1
    Forum Contributor
    Join Date
    01-21-2013
    Location
    Aberdeen, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    258

    Automatic E-mail - include signature including formatting and Image

    Hey all,

    Just a quick question.

    I have a macro that creates an automatic e-mail, it works great except the signature that usually comes up when I create a new e-mail manually doesn't work. It still gets displayed but the formatting is gone and the company logo is just displayed as a hyper-link. Has anyone got any ideas how to get the formatting correct and how to get the Company Logo in there? I've tried using .HTMLbody and that doesn't work.

               .To = Dist
                        .CC = Orig
                        .SentOnBehalfOfName = "PPU Document Control"
                        .Subject = SubJ
                        .ReadReceiptRequested = False
                        .Display
                        .Body = Msg & .Body
                        .Attachments.Add (Ease)
    Thanks for any help!
    Last edited by RichTea88; 11-19-2013 at 09:24 AM.

  2. #2
    Forum Contributor
    Join Date
    01-21-2013
    Location
    Aberdeen, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    258

    Re: Automatic E-mail - include signature including formatting and Image

    Right,

    Stupid mistake, This now gives me my signature looking as it should but the text from 'msg' is all wrong. it doesn't put in any returns. Any ideas?

                        .To = Dist
                        .CC = Orig
                        .SentOnBehalfOfName = "PPU Document Control"
                        .Subject = SubJ
                        .ReadReceiptRequested = False
                        .Display
                        .HTMLBody = Msg & .HTMLBody
                        .Attachments.Add (Ease)
    Msg = "Good " & g01 & "," & vbCrLf & vbCrLf _
              & "Please find attached the above document, issued for " & TSht.Cells(39, "R") & " as advised by " & Orig & "." & vbCrLf & vbCrLf _
              & Msg2

  3. #3
    Forum Contributor
    Join Date
    01-21-2013
    Location
    Aberdeen, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    258

    Re: Automatic E-mail - include signature including formatting and Image

    okay, almost there.

    I've managed to use html instead of coding to put in the line breaks, but after the 'Good Afternoon' it changes the font. Anyone know how to stop the text changing from Times New Roman to Calibri (Body)? Or if I can change it all to Tahoma?

                Msg = "Good " & g01 & ",<br><br>" _
                & "Please find attached the above document, issued for " & TSht.Cells(39, "R") & " as advised by " & Orig & ".<br/><br/>" _
                & Msg2
        
            On Error Resume Next
            Set OutApp = CreateObject("Outlook.Application")
                On Error GoTo 0
                    If OutApp Is Nothing Then Set OutApp = CreateObject("Outlook.Application")
                    Do: Loop Until Not OutApp Is Nothing
            Set OutMail = OutApp.CreateItem(olMailItem)
            With OutMail
        
    
                        
                        .To = Dist
                        .CC = Orig
                        .SentOnBehalfOfName = "PPU Document Control"
                        .Subject = SubJ
                        .ReadReceiptRequested = False
                        .Display
                        .HTMLBody = Msg & .HTMLBody
                        .Attachments.Add (Ease)
                        
        End With
            Set OutApp = Nothing
            Set OutMail = Nothing
    End Sub

  4. #4
    Forum Contributor
    Join Date
    01-21-2013
    Location
    Aberdeen, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    258

    Re: Automatic E-mail - include signature including formatting and Image

    Finished

    Msg = "<font face=Tahoma>Good " & g01 & ",<br><br>" _
                & "Please find attached the above document, issued for " & TSht.Cells(39, "R") & " as advised by " & Orig & ".<br/><br/>" _
                & Msg2
        
            On Error Resume Next
            Set OutApp = CreateObject("Outlook.Application")
                On Error GoTo 0
                    If OutApp Is Nothing Then Set OutApp = CreateObject("Outlook.Application")
                    Do: Loop Until Not OutApp Is Nothing
            Set OutMail = OutApp.CreateItem(olMailItem)
            With OutMail
        
    
                        
                        .To = Dist
                        .CC = Orig
                        .SentOnBehalfOfName = "PPU Document Control"
                        .Subject = SubJ
                        .ReadReceiptRequested = False
                        .Display
                        .HTMLBody = Msg & .HTMLBody
                        .Attachments.Add (Ease)
                        
        End With
            Set OutApp = Nothing
            Set OutMail = Nothing

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Email macro, include variable in body & add default outlook signature
    By promithius in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-13-2013, 09:05 AM
  2. Send e-mail with image on body (.html) on e-mail manager <> outlook
    By mariotnc in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-05-2012, 09:28 PM
  3. Linking to an image in another cell (Electronic Signature)
    By jonvanwyk in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 12-16-2010, 05:03 PM
  4. Formatting Text Signature in Mail Template
    By dieseldogpi in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-19-2010, 09:50 AM
  5. Replies: 1
    Last Post: 04-23-2009, 07:47 PM

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