Default signatures for two ore more mail adresses

Hy Guys!

My problem is I can't find a way to set default signatures for more than one mail adress in one outlook profile.

It's no problem to set the default signature for one mail adress with powershell, vbs or whatever but I can't find a solution for my problem.

Unfortunately I have to solve that problem without GPOs, AD or Exchange options.

I hope anyone here can help me with that thing.

Greetings

XPSIT

  • Moved by Bill_Stewart Wednesday, September 02, 2015 1:57 PM Move to more appropriate forum
September 2nd, 2015 9:24am

Hi Satyajit,

no I have two IDs (different exchange mailboxes/users) which I use at the same time, same pc and same outlook profile.

Now I hope you know what I mean.

Below is the whole test script which I copied from another website. Please ignore the active directory part because in the final script I can't use AD. (I have to use an access database for the user informations)

'========================== 
' 
' ############### Script that creates a standard company signature for all users (in a corporate environment); pulling data from Active Directory - dynamic logo insertion depending on department field if needed. 
' 
' Original by Severn Dickinson 
'
' Big up to Script Centre 
' 
' 17-01-2011. 
' 
'=========================== 
 
 
On Error Resume Next 
Set objSysInfo = CreateObject("ADSystemInfo") 
 
 
 
' ########### This section connects to Active Directory as the currently logged on user 
 
strUser = objSysInfo.UserName 
Set objUser = GetObject("LDAP://" & strUser)  
 
 
 
' ########### This section sets up the variables we want to call in the script (items on the left; whereas the items on the right are the active directory database field names) - ie strVariablename = objuser.ad.databasename 
 
strGiven = objuser.givenName 
strSurname = objuser.sn 
strAddress1 = objUser.streetaddress 
strAddress1EXT = objUser.postofficebox 
strAddress2 = objuser.l 
strAddress3 = objuser.st 
strPostcode = objuser.postalcode 
strCountry = objuser.c 
strFax = objuser.facsimileTelephoneNumber 
strMobile = objuser.mobile 
strTitle = objUser.Title 
strDepartment = objUser.Department 
strCompany = objUser.Company 
strPhone = objUser.telephoneNumber 
strEmail =objuser.mail 
strWeb = objuser.wWWHomePage 
strNotes = objuser.info 
strExt = objuser.ipPhone 
strDDI = objuser.homephone 
strEmailTEXT = "Email: " 
 
 
 
' ########### Sets up word template 
 
Set objWord = CreateObject("Word.Application") 
Set objDoc = objWord.Documents.Add() 
Set objSelection = objWord.Selection 
 
objSelection.Style = "No Spacing" 
Set objEmailOptions = objWord.EmailOptions 
Set objSignatureObject = objEmailOptions.EmailSignature 
Set objSignatureEntries = objSignatureObject.EmailSignatureEntries 
 
 
 
' ########### Calls the variables from above section and inserts into word template, also sets initial font typeface, colour etc. 
 
objSelection.Font.Name = "Cambria" 
objSelection.Font.Size = 10 
objselection.Font.Bold = false 
objSelection.Font.Color = RGB (000,000,000) 
 
objSelection.TypeParagraph()
 
objselection.typetext "Met Vriendelijke groeten (Kind Regards),"
objSelection.TypeParagraph()
objSelection.TypeParagraph() 
objSelection.TypeText strGiven & " " & strSurname 

objSelection.Font.Size = 10 
objSelection.TypeText "" 
objselection.TypeText strnotes 
objselection.TypeText Chr(11) 
objSelection.Font.Size = 10 
objselection.Font.Bold = false 
objSelection.TypeText strTitle & Chr(11) 
objselection.TypeText Chr(11) 
 
 
 
' ########### Logos insert routine. 
 
 
If (objUser.Department = "COMPANY NAME.") Then 
             objSelection.InlineShapes.AddPicture("\\jsddom01\data\image001.gif") 
 
 
ElseIf (objUser.Department = "COMPANY NAME") Then 
        objSelection.InlineShapes.AddPicture("\\jsddom01\data\image001.gif") 
 
Else 
        objSelection.InlineShapes.AddPicture("\\jsddom01\data\image001.gif") 
 
End If 
 
  
' ############ 1 Column en 1 Row
 
 
objselection.TypeText Chr(11) 
  
Const Number_of_rows = 12 
Const Number_of_columns = 2 
Const END_OF_STORY = 12 
 
objSelection.TypeParagraph() 
Set objRange = objSelection.Range 
objDoc.Tables.Add objRange, number_of_rows, number_of_columns 
 
Set objTable = objDoc.Tables(1) 
 
If (objUser.postofficebox = "") Then 
 
  objTable.Cell(1, 1).Range.Text = strCompany
  objTable.Cell(2, 1).Range.Text = strAddress1 
  objTable.Cell(3, 1).Range.Text = strPostcode 
  objTable.Cell(4, 1).Range.Text = strAddress2 
  objTable.Cell(5, 1).Range.Text = strAddress3 
 
Else 

  objTable.Cell(1, 1).Range.Text = strCompany 
  objTable.Cell(2, 1).Range.Text = strAddress1 
  objTable.Cell(3, 1).Range.Text = strAddress1EXT 
  objTable.Cell(4, 1).Range.Text = strPostcode 
  objTable.Cell(5, 1).Range.Text = strAddress2 
  objTable.Cell(6, 1).Range.Text = strAddress3
 
End If 
 
 
objTable.Cell(7, 1).Range.Text = "Tel: " & strPhone & " | Ext: " & strExt 
objTable.Cell(8, 1).Range.Text = "Fax: " & strFax 
objTable.Cell(9, 1).Range.Text = "Mobile: " & strMobile 
 
 
'### Makes a clickable hyperlink. 
 
Set objCell = objTable.Cell(10, 1) 
Set objCellRange = objCell.Range 
objCell.Select 
objSelection.TypeText "Web: " 
Set objLink = objSelection.Hyperlinks.Add(objSelection.Range, "http://www.website.com", , , "www.website.com") 
  objLink.Range.Font.Name = "Cambria" 
  objLink.Range.Font.Size = 10 
  objLink.Range.Font.Bold = false 
  objSelection.Font.Color = RGB (000,045,154) 
 
 
'### Makes a clickable mailto: email address based on the users AD information. 
 
Set objCell = objTable.Cell(11, 1) 
Set objCellRange = objCell.Range 
objCell.Select 
objselection.typeText strEmailTEXT 
Set objLink = objSelection.Hyperlinks.Add(objSelection.Range, "mailto: " & strEmail, , , strEmail) 
  objLink.Range.Font.Name = "Cambria" 
  objLink.Range.Font.Size = 10 
  objLink.Range.Font.Bold = false 
 
 
objTable.AutoFitBehavior(1) 
 
objSelection.EndKey END_OF_STORY 

'### Clickable Facebook Link NEED A IMAGE WICH LINKS TO A WEBSITE

 
 
' ########### Tells outlook to use this signature for new messages and replys. Signature is called Email Signature. 
 
Set objSelection = objDoc.Range() 
wscript.echo objSignatureObject

objSignatureEntries.Add "Email Signature", objSelection 
objSignatureObject.NewMessageSignature = "Email Signature" 
objSignatureObject.ReplyMessageSignature = "Email Signature" 
 
 
objDoc.Saved = True 
 
objWord.Quit

Regards,

XPSIT

Free Windows Admin Tool Kit Click here and download it now
September 9th, 2015 5:05am

Hi XPSIT,

Thank you for the details.

What I can understand is that you have configured a single Outlook Profile and then have manually added or (if you have right permission) Outlook automatically adds the shared mailbox.

Hope I'm correct till here.

Now you are using script to assign signature. This signature will be assigned to the primary\default outlook profile account\user and not to the remaining additional ones.

September 9th, 2015 7:54am

Hi Satyajit,

yes! Now we are on the correct way! ;-)

And now you also can see what's my problem is! I want to add  a default signature for the shared mailbox too.

As I say it's no problem to do that with outlook itself but I can't find a way to tell my script to do the same.

Regards,

XPSIT

Free Windows Admin Tool Kit Click here and download it now
September 9th, 2015 8:03am

Hi XPSIT,

"do that with outlook itself ". Please share the details\steps how do you do that, so that I can test it on my side.

Additional info:

Outlook version, Exchange version, Desktop OS

September 9th, 2015 8:45am

Hi Satyajit,

oh I hope I can explane that steps in English correctly.

Ok first the version informations: Outlook 2013 (365) and Outlook 2010, Exchange 2013, Win7

So now the way to two siganatures for two IDs.

1. Home -> New E-Mail -> Signatures... or File -> Options -> E-Mail -> Signatures...

2. Now here I can choose the E-Mail account for which one I want to set the default signature (new messages, replies/forwards).

So thats the way I set the signatures for different IDs/mailboxes/accounts.

I hope it's enough information for you to test it.

Regards,

XPSIT

Free Windows Admin Tool Kit Click here and download it now
September 9th, 2015 10:03am

Hi XPSIT,

Thanks for the detailed steps, I'm able to understand what you are looking for now.

What I have found till now is, Outlook uses local registry to store the settings when you make changes using the earlier steps.(Like most of the other windows apps).

The problem is the path is guid like and the settings are stored as REG_Binary, hence not very easy way to modify it.

"New Signature"

"Reply-Forward Signature"

Under the GUID the accounts are numbered as 0001(blank),0002(first one),0003(second one) etc.

Microsoft does provide another reg method to override this setting, but only applies to the default account, I believe. You can give it a shot and let me know, if it applies to single or all accounts.

How to deploy a default email signature in Outlook:

https://support.microsoft.com/en-us/kb/2691977#/en-us/kb/2691977

Some issue related to the confing above.

Without this the binary profile way is too complex, here is some article making efforts using python script.

Programmatically set Outlook 2013 Signature Defaults?:

September 9th, 2015 11:37pm

Hi XPSIT,

The second options works.

The signature files need to be present in the location

%userprofile%\AppData\Roaming\Microsoft\Signatures

C:\...\AppData\Roaming\Microsoft\Signatures>dir /b
Satya2.htm
Satya2.rtf
Satya2.txt
Satya.htm
Satya.rtf
Satya.txt
Satya_files
Satya2_files

The filenames without extension automatically appears in Outlook "Select signature to Edit:"

You need to update the registry in this manner. Use only the filename without extension as the value.

[HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Common\MailSettings]
"NewSignature"="Satya"
"ReplySignature"="Satya"

 You can use the VBscript to prepare the signature file and set it on single account and then use PowerShell script to make it permanent on all accounts.

Update or Add Registry Key Value with PowerShell

Only limitation is you need to have single default signature across all profiles and accounts. Provided the account credentials used has access to the %userprofile% f

Free Windows Admin Tool Kit Click here and download it now
September 10th, 2015 12:11am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics