+ Reply to Thread
Results 1 to 5 of 5

Macro that switches email signatures

  1. #1
    Forum Contributor
    Join Date
    01-09-2016
    Location
    USA,USA
    MS-Off Ver
    2016
    Posts
    1,179

    Macro that switches email signatures

    This is the code I have, but when executed it opens the template and adds my default account's signature. I can go up and manually select the other signature but can I add that into this code?

    OR even 100% better would be NO signature whatsoever. I use to do that via a RegEdit but cannot do that any longer.

    Please Login or Register  to view this content.
    Last edited by taylorsm; 04-05-2018 at 05:58 PM.

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

    Re: Macro that switches email signatures

    assuming you only want NO Signature (if you want another signature different to default...very different ball game)

    as signature gets added when you first do .display then this should do the trick

    basically open template and copy the body only (since you do not .display no signature added)
    then open new mailitem then .display
    then overwrite everything with OFT body copied from before


    Please Login or Register  to view this content.
    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
    01-09-2016
    Location
    USA,USA
    MS-Off Ver
    2016
    Posts
    1,179

    Re: Macro that switches email signatures

    That works great, but one thing is that my template has an image in it (company logo) and when I use this then I get the red x for the image. But if I go and open the template manually then the image is there.

    Edit*

    If I use my macro above then the image loads just fine.
    Last edited by taylorsm; 04-06-2018 at 10:49 AM.

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

    Re: Macro that switches email signatures

    you always seem to have curve balls!
    outlook vba isnt really my forte just really adapt what i know from excel VBA

    Using this as the base code
    https://www.slipstick.com/developer/...e-message-vba/

    Please Login or Register  to view this content.
    this seems to work in my test setup
    image showing
    Last edited by humdingaling; 04-08-2018 at 08:30 PM. Reason: updated

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

    Re: Macro that switches email signatures

    updated with your other loop

    Please Login or Register  to view this content.
    ps you will need to enable MS WORD object library or alternatively change the code to be late binding

+ 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. debugging macro switches to UDF which then gives #VALUE!
    By mdnuts in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-23-2015, 01:40 PM
  2. Workflow with signatures (if cell=x then send email, if signed then send email)
    By Kate2811 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-25-2014, 05:37 AM
  3. Macro switches the date format from UK to US
    By gallen6945 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-20-2014, 09:49 AM
  4. [SOLVED] Using a Macro that switches between workbooks
    By Jorge in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-22-2006, 07:10 AM
  5. [SOLVED] Don't show sheet switches when running macro
    By Ben in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-25-2005, 09:22 AM
  6. Macro for Filter Switches ... Maybe???
    By Ken in forum Excel General
    Replies: 4
    Last Post: 02-25-2005, 02:06 PM
  7. [SOLVED] Filter Switches vs Macro?
    By Ken in forum Excel General
    Replies: 3
    Last Post: 02-24-2005, 07:06 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