+ Reply to Thread
Results 1 to 14 of 14

outlook VBA: how to add alternative signature to email instead of the default

  1. #1
    Forum Contributor
    Join Date
    12-18-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 365
    Posts
    108

    outlook VBA: how to add alternative signature to email instead of the default

    Hi,

    Nearly all macro's I have found all add the default signature to the email string, but I have a certain signature I want to add to specific responses.
    Let's say this signature name is "ABCDE"

    How can I add this to the outlook VBA?

  2. #2
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,637

    Re: outlook VBA: how to add alternative signature to email instead of the default

    have you tried Ron's code?

    http://www.rondebruin.nl/win/s1/outlook/signature.htm
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Forum Contributor
    Join Date
    12-18-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 365
    Posts
    108

    Re: outlook VBA: how to add alternative signature to email instead of the default

    I have, and this is great for creating new emails,
    but mine is going to be a reply or forward to an existing email, keeping the existing attachments and email string.

    btw, this is the code I already have and where I only need to add the signature change

    Please Login or Register  to view this content.
    Last edited by Marijke; 11-10-2015 at 10:31 AM.

  4. #4
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,637

    Re: outlook VBA: how to add alternative signature to email instead of the default

    Outlook VBA is not really my area but all i can suggest is maybe something like the below code
    whereby you "grab" the signature and shove it into the body
    it works in my trial but....i found the formatting to be off because my signature is in HTML

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    12-18-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 365
    Posts
    108

    Re: outlook VBA: how to add alternative signature to email instead of the default

    Like my VBA, this one grabs the default signature, only yours is in plain text, while mine kept it in html.
    I have also used Ron de Bruins page and tried to combine, but no luck so far.
    I'm sure there must be a line inserted somewhere, where you can tell VBA to pull a certain signature forward, I just can't manage to put it together.
    (or I might have missed on a Dim.... As.... instruction)


    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    08-27-2006
    Posts
    136

    Re: outlook VBA: how to add alternative signature to email instead of the default

    Please Login or Register  to view this content.
    To mark "Solved" go to Thread Tools.

  7. #7
    Forum Contributor
    Join Date
    12-18-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 365
    Posts
    108

    Re: outlook VBA: how to add alternative signature to email instead of the default

    I have been OOO for some time and finally got around to reworking this 'problem' of mine.
    I almost got it to do what I need to, (with the help of skatonni!) but I have 1 problem yet to solve;
    How do I change the subject line?

    I used to replace certain words with others, but I somehow can't get it to incorporate in the new module....
    For example, subject says Good morning Marijke, nice to see you
    and I want it to say, Good afternoon team, nice to see you


    Please Login or Register  to view this content.

  8. #8
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,637

    Re: outlook VBA: how to add alternative signature to email instead of the default

    wow very old thread

    Please Login or Register  to view this content.
    cant you just add .subject?
    like so
    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    12-18-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 365
    Posts
    108

    Re: outlook VBA: how to add alternative signature to email instead of the default

    yeah, I know... I should be ashamed

    tried that trick you suggested, (and a couple of others actually)
    but it replaces the entire subject line (and in the other things I tried it just ignores it completely and leaves the subject line as is.)

  10. #10
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,637

    Re: outlook VBA: how to add alternative signature to email instead of the default

    Please Login or Register  to view this content.
    what you had above for subject, i modified it slightly
    made the variable strSub instead of subject to make it more clear

    also you dont need boiler separate i added it directly into the code
    Last edited by humdingaling; 09-14-2016 at 08:47 PM. Reason: slight code change

  11. #11
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,637

    Re: outlook VBA: how to add alternative signature to email instead of the default

    cleaned it up some more and added more descriptions

    Please Login or Register  to view this content.
    i am assuming you only want to mark unread & "processing" for mail items which you actually process

  12. #12
    Forum Contributor
    Join Date
    12-18-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 365
    Posts
    108

    Re: outlook VBA: how to add alternative signature to email instead of the default

    Exactly what I was looking for humdingaling!!
    works like a charm

    Big thanks from my end, and case closed.....

  13. #13
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,637

    Re: outlook VBA: how to add alternative signature to email instead of the default

    not a problem
    good to hear

    i learnt a thing or two since you first started the thread

  14. #14
    Forum Guru
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: outlook VBA: how to add alternative signature to email instead of the default

    Thanks humdingaling for code that is very useful.

    I know this is an old thread, however if there is an embedded image in the Signature, the embedded image will not be displayed. The following code (important parts in red) should take care of that problem:
    Please Login or Register  to view this content.
    Lewis
    Last edited by LJMetzger; 11-03-2017 at 08:38 AM.

+ 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. Use VBA to send email from Outlook and use senders default signature
    By BillDoor in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-21-2015, 11:02 AM
  2. Trying to add a default signature into an email from VBA
    By murp5972 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-13-2015, 09:33 AM
  3. [SOLVED] Get Default Signature of outlook
    By naveenmarapaka in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-24-2014, 08:17 AM
  4. 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
  5. send selected range in email with default outlook email signature included
    By mdsickler in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-04-2013, 10:50 PM
  6. Unable to link default email signature to email
    By paxile2k in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-15-2010, 06:52 PM
  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