+ Reply to Thread
Results 1 to 11 of 11

Trying to add a default signature into an email from VBA

  1. #1
    Registered User
    Join Date
    06-26-2015
    Location
    St.Paul, Minnesota
    MS-Off Ver
    Excel 2010
    Posts
    37

    Trying to add a default signature into an email from VBA

    My email code currently works just fine, but I want to add a signature right after the "Sincerely," in the body text. The signature is saved as a JPEG and its uploaded into outlook as a default signature however it doesn't show up. I would prefer my code to include it automatically at the end of the body text. What would I have to add to my code to achieve this?Thanks so much!

    Heres the code:

    Please Login or Register  to view this content.
    Last edited by murp5972; 07-10-2015 at 09:14 AM.

  2. #2
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Trying to add a default signature into an email from VBA

    murp, this question has come up a few times in the past couple of days... you can search the forum if you like, but I have no problem helping. If I can ask... is it just the default signature that would normally be added by Outlook that you want to have in your email?
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  3. #3
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Trying to add a default signature into an email from VBA

    If the answer to the above is yes, then this should work:

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    06-26-2015
    Location
    St.Paul, Minnesota
    MS-Off Ver
    Excel 2010
    Posts
    37

    Re: Trying to add a default signature into an email from VBA

    Arkadi, thanks for the reply!
    I should have specified that the signature is a default for my 2nd email account, but it's not the default signature for the default email account. The code I have here sends the email from the 2nd Outlook account, so I figured it would pull that default signature with your code, however it is not. Any suggestions? Thanks again!
    Last edited by murp5972; 07-10-2015 at 10:38 AM.

  5. #5
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Trying to add a default signature into an email from VBA

    Try the code below... you will have to modify the red sections, the first one is the username of the account with the signarue (windows), and the second part is the name of the signature file. You can browse to the folder and find which htm file you need, mind you appdata won't show up unless you actually type it in, it is a hidden folder.

    The only issue may be images in signature.. I'm not sure though.

    Please Login or Register  to view this content.
    EDIT: Images should work fine...
    Last edited by Arkadi; 07-10-2015 at 11:03 AM.

  6. #6
    Registered User
    Join Date
    06-26-2015
    Location
    St.Paul, Minnesota
    MS-Off Ver
    Excel 2010
    Posts
    37

    Re: Trying to add a default signature into an email from VBA

    Hi Arkadi,

    I'm now getting the "file not found" error messaage. To clarify, the "username_here" needs to be edited to the username of the outlook account i want the eamil to be sent from? And does the "specify_file" need to be simply the file name or its entire file path. Thanks for your help!

  7. #7
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Trying to add a default signature into an email from VBA

    username for windows user logged in. specify file is just the part of the file without htm... i've given the rest of the path

    if you put C:\Users\username_here\AppData\Roaming\Microsoft\Signatures in windows explorer window you should be able to see the signature files... but username_here is the windows login name

  8. #8
    Registered User
    Join Date
    06-26-2015
    Location
    St.Paul, Minnesota
    MS-Off Ver
    Excel 2010
    Posts
    37

    Re: Trying to add a default signature into an email from VBA

    I'm not finding the signature file within a signature folder anywhere. The signature however is saved to my desktop as a .jpg titled "Loan Admin" and its title within outlook is also "Loan Admin". I'm working from a remote desktop with many user's if you think that might make a difference.
    Last edited by murp5972; 07-10-2015 at 01:30 PM.

  9. #9
    Registered User
    Join Date
    06-26-2015
    Location
    St.Paul, Minnesota
    MS-Off Ver
    Excel 2010
    Posts
    37

    Re: Trying to add a default signature into an email from VBA

    Edit: I unhid the hidden folders and found the Signatures folder. I can see that my .htm file name is "Loan Admin". Everything works now except for the picture in the signature "cannot be displayed" any suggestions? Thanks!

  10. #10
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Trying to add a default signature into an email from VBA

    I had the same problem... Saved, re-opened, and picture was OK... Maybe try that? Not sure otherwise...

  11. #11
    Registered User
    Join Date
    06-26-2015
    Location
    St.Paul, Minnesota
    MS-Off Ver
    Excel 2010
    Posts
    37

    Re: Trying to add a default signature into an email from VBA

    Just checked back in from the weekend. Still getting the same problem with the image in the signature not being displayed, but everything else works just fine. I tried to save and re-open but it doesnn't seem to help.

+ 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] default email signature
    By bigfishprf in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-08-2015, 10:55 AM
  2. [SOLVED] Excel VBA code for saving PDF to file & adding default signature to Email
    By bdouglas1011 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-02-2014, 01:54 AM
  3. generating automatic email with default signature and hyperlink
    By jerrydiaz in forum Outlook Programming / VBA / Macros
    Replies: 0
    Last Post: 04-24-2014, 11:55 AM
  4. 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
  5. 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

Tags for this Thread

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