Automatically Add Signature to Outlook

Automatically Add Signature to Outlook

Microsoft has added the ability for email signatures to roam. This is great news for users who use Outlook on multiple devices as it stores signature settings at the mailbox level and not directly in Outlook’s settings. You want to Automatically Add Signature to Outlook but sometimes, you can’t.

If the signature is created programmatically for you by your IT admin or roaming signatures are turned off (also done by your IT admin) you will have to find other ways.

I will show you two ways. One way if you are an administrator and another way if you are a user.

Create a Signature for Your users as an Administrator

This might fall out of your skill set. It does require some scripting and HTML programming knowledge. Don’t worry, there are a lot of articles on the internet to help you with this. I will walk you through the steps.

Get familiar with the names of the names of the attributes in AD. You will be referring to them as you write the script that renders the HMTL code. The code will be written to a file and then placed in the %AppData%\Microsoft\Signatures\ location as an HTML file.

Here is the sample vbs code for a simple signature:

On Error Resume Next

Dim strUser,strName,strTitle,strMail,strPhone,strFax
Dim strCompany,strLocation,strAddress,strCity,strState
Dim strZip,strWeb,strInfo,ADObject


Set fso=CreateObject("Scripting.FileSystemObject")
Set objSysInfo = CreateObject("ADSystemInfo")
Set WshShell = CreateObject("WScript.Shell")

                            'Active Directory Info Object
Set ADObject = CreateObject("ADSystemInfo")

strUser = ADObject.UserName

                            'Active Directory Connection
Set objUser = GetObject("LDAP://" & strUser)

                            'Pull Active Directory Info for this User

strOutlookVersion = Left(objOutlook.Version, 2)
strUserid = objUser.userPrincipalName
strFName = objUser.FirstName
strLName = objUser.LastName
strTitle = objUser.Title
strEmail = objUser.mail
strPhone = objUser.telephoneNumber

Dim objFSO, objWsh, appDataPath, pathToCopyTo, plainTextFile ,imagePath
Dim plainTextFilePath, richTextFile, richTextFilePath, htmlFile, htmlFilePath, SigFilename

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objWsh = CreateObject("WScript.Shell")
appDataPath = objWsh.ExpandEnvironmentStrings("%APPDATA%")
pathToCopyTo = appDataPath & "\Microsoft\Signatures\"

'Create HTML Signature

htmlFilePath = pathToCopyTo & "ACMESignature.htm"
Set htmlFile = objFSO.CreateTextFile(htmlFilePath, TRUE)
htmlfile.WriteLine("<p>" & strFName & " " & strLName & "</p>")
htmlfile.WriteLine("<p>" & strTitle & "</p>")
htmlfile.WriteLine("<p>" & "Acme Company" & "</p>")
htmlfile.WriteLine("<p>" & "P. " & strPhone & "</p>")
htmlfile.WriteLine("<p>" & "E. " & "<a href=""strEmail"">" & strEmail& "</a>" & "</p>")


'Applying the signature in Outlook’s settings.
Set objWord = CreateObject("Word.Application")
Set objSignatureObjects = objWord.EmailOptions.EmailSignature

'Setting the signature as default for new messages.
objSignatureObjects.NewMessageSignature = "ACCSignature"

Set objFSO = Nothing
Set objWsh = Nothing

'Connect to Registry
Dim objShell, RegKey
Set objShell =  CreateObject("WScript.Shell")

Set objShell = Nothing

Create a Signature as a user

You will need some skills in HTML Coding. You can use any WYSIWYG editor to do the job. There are also a lot of tutorials on the net to do this. In this case all you need to do is create an HTML file to your liking and copy it to %AppData%\Microsoft\Signatures\ . Here is the sample html code you can save as a .html:

  <p>John Smith</p>
  <p>Acme Company</p>
  <p>P. 555-1212</p>
  <p>E. <a href="mailto:[email protected]">[email protected]</a></p>

The Result When You Automatically Add Signature to Outlook

Whether you programmatically add it through a script of manually ad the html file you will get this:

Automatically Add Signature to Outlook

This is one of the many aspects in outlook you can automate. At least being able to Automatically Add Signature to Outlook can be easy.

Avatar photo

I am an IT professional with over twenty years experience in the field. I have supported thousands of users over the years. The organizations I have worked for range in size from one person to hundreds of people. I have performed support from Help Desk, Network / Cloud Administration, Network Support, Application Support, Implementation and Security.

Pin It on Pinterest