+ Reply to Thread
Results 1 to 5 of 5

html body and default Outlook signature??

  1. #1
    Registered User
    Join Date
    07-29-2017
    Location
    London, England
    MS-Off Ver
    office 2013
    Posts
    13

    html body and default Outlook signature??

    Afternoon all,

    This is taking my frustration to a new level! I have a code that will send emails once a criteria is met (i.e overdue). This works fine, and it will populate an email with relevant information, but I want to have my standard Outlook signature included as well. I can achieve this by adding ".htmlbody" to the start and end of the body section. When I add '.htmlbody' (as in the code below) it removes ALL other information that i want to include. So seems i can have one or the other, not both. Can someone suggest a fix for this?


    Please Login or Register  to view this content.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: html body and default Outlook signature??

    Display the email first before adding the body. That will generate your signature. Then concatenate your body to the already existing signature.

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    07-29-2017
    Location
    London, England
    MS-Off Ver
    office 2013
    Posts
    13

    Re: html body and default Outlook signature??

    AlphaFrog,

    Thanks for the quick reply. I have just tried this and doesn't seem to work. I get an email with a correctly formatted signature but no content to the email ("this is an automated email...."). I don't get any error messages so assuming there isn't anything wrong with the code. Still confused and puzzled!

  4. #4
    Registered User
    Join Date
    07-29-2017
    Location
    London, England
    MS-Off Ver
    office 2013
    Posts
    13

    Re: html body and default Outlook signature??

    Just to clarify. If I take away the "html" part I can produce emails with all the content I want, but no signature. I can get round this by adding my signature to the VBA code, but wanted it to work for multiple users with their own signature!

    Please Login or Register  to view this content.

  5. #5
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: html body and default Outlook signature??

    Looks like the signatures have HTML document headers. Need to first get the HTML signature and then insert your HTML code in between the signature's header.

    I'm not an HTML coder, but this is what I came up with. There may be a better way.

    I also replaced your vbNewLine with the HTML < br >

    A quirk of this forum's security doesn't allow to post the HTML code < BODY > without the spaces in between. So in the code below, remove the spaces in the red text.

    Please Login or Register  to view this content.

+ 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. [SOLVED] Add Default Signature When Sending a Range as HTML in Outlook e-Mail
    By EnigmaMatter in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-27-2014, 12:40 PM
  2. [SOLVED] Get Default Signature of outlook
    By naveenmarapaka in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-24-2014, 08:17 AM
  3. HTML to Range -> OutApp: Outlook | Signature Issue
    By clprdctn in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-06-2014, 12:14 PM
  4. Excel ws into outlook html body with current html signature
    By Cadelanne in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-29-2014, 09:03 AM
  5. Excel VBA to open new outlook message with signature and preferred body text format
    By morayman in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-08-2013, 10:01 AM
  6. 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
  7. Getting Outlook To Add Default Signature
    By McNulty in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-13-2009, 01:17 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