General Computing
email microsoft-outlook office365 email-signature
Updated Wed, 21 Sep 2022 01:00:18 GMT

How to automatically switch my email signature in Outlook 365

I have two email signatures. I use an internal signature for all recipients, and an external signature for all At this moment, the default signature is the internal one. If I want to use the external one, I can manually set it in the ribbon.

I wondered if there was any possibility to let Outlook 365 automatically change the signature if he detects that the addressee email address does not belong to the company.

(Related question for Outlook 2007)

I tried to do this with a rule, but it seems that there is no suited rule available: enter image description here

The 'Apply rule on messages I send' is only able to apply an action after the message has been sent (see following 2 images). But I would need it to be activated after I have entered the addressees.

enter image description here enter image description here


The answer is no. You'll need to come up with some sort of custom solution or look for a third party app to help. I looked around a bit and didn't really find any solution I would recommend. Another route would be to look at smaller marketing integration tools - these may let you compose messages and send them with select signatures based on "campaign" - just assign certain users to the campaign and messages you generate will get the footer (or whatever else) you want to inject.

Back to a possible coding option

There is a forum string here that may help ( ).

They use the below to get access to signature files.

shell = new ActiveXObject(""); 
user_name = shell.ExpandEnvironmentStrings("%USERNAME%");  
fso =  new ActiveXObject("Scripting.FileSystemObject");
signatureTextStream = fso.OpenTextFile("C:\\Documents and Settings\\" + user_name + "\\Application Data\\Microsoft\\Signatures\\" + user_name + "." + file_ext, 1);
signatureContents = signatureTextStream.ReadAll();

If you combine that with logic to read the recipients - you may be able to get a working solution for your self.


Sub GetSMTPAddressForRecipients(mail As Outlook.MailItem) 
    Dim recips As Outlook.Recipients 
    Dim recip As Outlook.Recipient 
    Dim pa As Outlook.PropertyAccessor 
    Const PR_SMTP_ADDRESS As String = _ 
    Set recips = mail.Recipients 
    For Each recip In recips 
        Set pa = recip.PropertyAccessor 
        Debug.Print & " SMTP=" _ 
           & pa.GetProperty(PR_SMTP_ADDRESS) 
End Sub

If I get some time - I will try and put this together in a working solution, but if anyone else were to post it for you that would be great too. Otherwise hopefully this get's you down the right path.

Comments (1)

  • +0 – I accepted this answer as it is the most useful one, though I did not check it myself because I am now using an other system. — Mar 02, 2017 at 11:44