# Enforce signature policy in Exchange 2003 using Active Directory fields

Our organisation has decided it needs to have a standard signature block for all users based on their name, job title, contact details and office location, all of which are stored in Active Directory.

Has anyone found a neat solution for automatically generating Outlook/Exchange 2003 signatures based on Active Directory fields?

I'm a long time customer and fan of Exclaimer Mail Utilities.

It sits on your Exchange server and has lots of customisable rules which determine whether to apply stationary or not. I have it add to the top of all emails sent externally our corporate logo, and peoples name, job title and various phone numbers at the bottom - all pulled from Active Directory.

I've only used the support once, but they were very friendly, knowledgeable and resolved my issue very quickly.

• I've seen this recommended elsewhere. Most likely will try the Free trial. – dunxd Jun 25 '10 at 11:09
• Definately - you could just set it up so it only does the signature on your own address for testing and demo purposes. – Ben Pilbrow Jun 25 '10 at 15:51

I've had very good luck with a script I wrote. It writes from various AD fields into an invisible Word document, then copies it into Outlook 2007 as the default and reply signature.

I moved away from having it run automatically each login. Very rarely I would have issues on a user's first login to a machine, where Outlook couldn't yet open without walking through the wizard. As of now it's a GPO that just pushes a shortcut to users' desktops called "Reset Email Signature". This also allows users to have non-default signatures without them being overridden each time.

On Error Resume Next

Set objUser = GetObject("LDAP://" & strUser)

strName = objUser.FullName
strTitle = objUser.Title
strDepartment = objUser.Department
strCompany = objUser.Company
strPhone = objUser.telephoneNumber
strFax = objUser.faxNumber

strCity = objUser.L
strState = objUser.St
strPOBox = objUser.postalCode

strFirstName = objUser.givenName
strInitials = objUser.initials
strLastName = objUser.sn
If strInitials = "" Then
strFullName = strFirstName & " " & strLastName
Else
strFullName = strFirstName & " " & strInitials & ". " & strLastName
End If

Set objWord = CreateObject("Word.Application")

Set objSelection = objWord.Selection
objSelection.Style = "No Spacing"
objSelection.Font.Name = "Calibri"
objSelection.Font.Size = "11"

Set objEmailOptions = objWord.EmailOptions
Set objSignatureObject = objEmailOptions.EmailSignature

Set objSignatureEntries = objSignatureObject.EmailSignatureEntries

objSelection.TypeParagraph()
objSelection.TypeText "Sincerely,"
objSelection.TypeParagraph()
objSelection.TypeParagraph()
objSelection.TypeText "ORGANIZATION NAME"
objSelection.TypeParagraph()
objSelection.TypeParagraph()
objSelection.TypeText strFullName & ", " & strTitle
'objSelection.TypeText strName & ", " & strTitle
objSelection.TypeParagraph()
objSelection.TypeParagraph()
objSelection.TypeText strStreet
objSelection.TypeParagraph()
objSelection.TypeText strCity & ", " & strState & " " & strPOBox
objSelection.TypeParagraph()
objSelection.TypeText "Desk: " & strPhone
objSelection.TypeParagraph()
objSelection.TypeText "Fax:    " & strFax
objSelection.TypeParagraph()

objSelection.TypeParagraph()
objSelection.TypeParagraph()

'Picture below

Set objSelection = objDoc.Range()