Outlook Signature using VBA

Posted on 2014-08-01
Last Modified: 2014-08-13
Not sure if this is possible but I thought I would ask. We have different email signatures that we use throughout our company. We want to change these signatures monthly for all users. Is there a way to have it use a specific email signature for a given month? For example if we had SignatureA, SignatureB, and SignatureC and wanted to use SignatureA for January, February, and March. And then SignatureB for April, May, and June. And then SignatureC for the balance of the year. Could this be done in VBA code so the users don't have to remember to switch the signature? Or maybe have a list of the signature names in an Excel file with date ranges and have Outlook look at this file before it sends an email to see which signature to use based on the current date. But something like this would need to be set up on all my users Outlook program.
Question by:Lawrence Salvucci
    LVL 21

    Expert Comment

    by:Randy Poole
    The only way I know you could accomplish this by doing this in Outlook is to capture the thisOutlookSession objects event:
    Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)

    Open in new window

    Make sure there are no default signatures enabled for the account, then append the HTMLBody or Body of the item passed to the event based upon if this is an HTML email or plain text.
    LVL 1

    Author Comment

    by:Lawrence Salvucci
    I'm not very tech savvy with VBA so I really wouldn't know where to start with this. Would it make sense to store these signatures in a Word Doc already formatted and then have all the users pull the signature from this file? This way we could change the Word Doc based on what signature we wanted to use.
    LVL 76

    Accepted Solution

    Hi, lsalvucci.

    Yes, what you described is possible.  The simplest way is to set Outlook to use a given signature name.  For example, have everyone set Outlook to use a signature called "Corporate Signature".  That will create three files in the user's Signature folder (i.e. c:\Users\<username>\AppData\Roaming\Microsoft\Signatures), one for each mail format (i.e. HTML, plain text, rich text).  You can then use a script or batch to overwrite those three files on some schedule.  For example, if you're organization uses a logon script, then you could include the commands there.  Using your example, on the 1st of January you would overwrite the signature files with signature A.  On April 1st you'd overwrite them with signature B.  Does that make sense?
    LVL 1

    Author Comment

    by:Lawrence Salvucci
    Yes that makes sense. I think that's a good solution. I'll set that up and see how it works. Thank you for your help!
    LVL 76

    Expert Comment

    by:David Lee
    You're welcome.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Learn more about how the humble email signature can be used as more than just an electronic business card. When used correctly, a signature can easily be tailored for different purposes by different departments within an organization.
    Outlook Free & Paid Tools
    Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
    This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now