Link to home
Start Free TrialLog in
Avatar of LawCentral
LawCentralFlag for Australia

asked on

dynamic signature insertion in Outook

Hello All,

I am creating a web portal for a company. One of the requirements is to create and install a dynamically created signature to the mail client. This signature must be send across via an email to the users. The users then install this signature into their mail client. The users are using a variety of mail clients i.e. Outlook 2000/2002/2003/ xp and outlook express.

With dynamic I mean is users will have ability to create their own signature in Rich format on the portal and then it gets emailed either to them or nominated personell in their organisation.

I need to create a soltuion by which the signatures automatically get uploaded in their mail clients(as explained previous) without them requiring to insert signature manually.

Can anyone please suggest the best approach to tackle this? What is a good starting point on this? Do you know of any sample code?

Many Thanks,

Hemal

Avatar of David Lee
David Lee
Flag of United States of America image

Greetings, LawCentral.

> nominated personell in their organisation
Sorry, but I don't understand what this means.  Can you explain?

> signatures automatically get uploaded in their mail clients
How many employees are we talking about?  If the signature is going to be emailed to them, then the only way this is going to work automatically is with either an Outlook macro or add-in.  There would have to be some code already present on each computer that would be triggered by the arrival of the message containing the signature.  It would see the message, open it, detach the signature, and perform the steps necessary to put it in place.  A better alternative might be to create the signature, leave it on the server, and send a link to the employee.  The link would point to a script file on the server.  When the employee clicked the link it would download and install the signature.

The problem is going to be setting the signature in Outlook.  The selected signature is stored as two values in the registry.  Writing to the registry isn't a problem, but calculating the key to write to for a given Outlook profile may be.  The signatures are stored in this registry key "HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\Outlook\<Some Value>\00000002" as two values: New Signature and Reply-Forward Signature.  I'll look back through my reference material and see if there's a way to get that value, which I beleive is the ID of the user's profile.  If there is, then this becomes a relatively simple exercise in scripting the downloading of the signature and writing the necessary values to the registry.

Cheers!
In outlook 2003, when you set up a signature, an .htm file is created and gets stored at the location C:\Documents and Settings\Administrator\Application Data\Microsoft\Signatures (may change according to the user). If you have the web based system create a signature and have it always overwrite that particular file retaining the same name (through the web interface itself), outlook will not know any difference and would start using the particular signature. This option can be tested by you if you find out the Signature file name of a user and using an administrative share do a manual overwrite of the particular file with one of your (in the same name) and then ask the user to check the signature. It will work. Then comes the hard part to code it in HTML.

Outlook Express will also be saving the signature in the same way.

You will not have to face any hitches if you could set up unique signature names depending on the user and through the web interface save the updated file to the users signature location.

Am I making sense.
Avatar of LawCentral

ASKER

Hello BlueDevilFan,

I do not have the luxury to store the signature file on the server and get user to execute the link. However, I will be delighted to know the way to insert the signature entries into the resitry. Can you please help me out with this?
upul1007,

Your comments make a lot of sense and I checked my own profile settings and it seems you are right on the mark. However, if I was to enable copying of the siganture file in 3 formats i.e. html, rtf and txt, do need to make any registry settings or modification for outlook to know whether these files are for a signature and outlook should know about them?

I hope I explained it well.
Hi Hemal (is that Sri Lankan by the way?). Outlook does create three versions of the signature as u stated. But if you can link it up so that the person creating the signature has the same file name, the registry entry would not matter.

As far as the registry settings go, your file before the update is the same file after the update.....
Upul007,

Thanks but it is not Sri Lankan. Secondly, the signature files I am going to create do not exist. They will be brand new files.

So will be appreciated to know more about altering the registry settings.

Kind regards, Hemal
Thanks for the clarification.....For my comment to work you do need to have the user set up the initial signature. How many users are there?

Are you the one creating the web app? Are you familiar with getting an app to create a script that the users can run or run when they log on. If yes, perhaps bluedevilfan may be in a better position to help. I have no idea about the registries....

some time back I would research the issue to help you as well as for my learning, but currently I am looking for a new job. So cant go the extra mile for you. Sorry.
That is fine. I cannot get user to run a script on logon. This entries need to be made entirely from the user end. There is no gaurantee of a pre-existing signature.

Upul007 Thanks for your help.
But if you use active directory at office, you can get the script to run when they login.
Well. I wont have access to users active directory or any such infrastructure. Only thing I have at my disposal is outlook client.

Thanks, Hemal
How many pc's are you looking at?
Also please refer this question and the link I had posted there. https://www.experts-exchange.com/questions/21897542/Best-Method-For-Corporate-Email-Signatures.html 

You may want to follow that question as well. May offer you an insight.
Upul007,

The solution I have to create is a web based portal. I do not need to worry about number of PC's or anything of the like. My main concern is to find a way of transferring the signature files across to the user and then running a script on their PC to install the signatures in outlook.

I hope this elaborates it further. Thanks, Hemal
ASKER CERTIFIED SOLUTION
Avatar of upul007
upul007
Flag of Sri Lanka image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
> I will be delighted to know the way to insert the signature entries into the resitry. Can you please help me out with this?
Sorry to be so slow responding.  I was attempting once again to discover how to get the registry key of the current Outlook profile.  I'm just not making any progress.  Writing to a resgistry key is simple.  Here are instructions: http://www.devguru.com/Technologies/wsh/quickref/wshshell_RegWrite.html

The real issue is which key to write to.  There are two values and they're stored here:

HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\Outlook\9375CFF0413111d3B88A00104B2A6676\00000002

The value names are "New Signature" and "Reply-Forward Signature".  They're in unicode format.  The problem is that the value between "Outlook" and "00000002" varies and I cannot discover how to know or calculate what that value is going to be.  I suppose you could write some code that'd enumerate all the values until you found the one you need.  But that doesn't seem practical.
Thank you for the help. I am currently trying to code and resolve the registry issue.
SOrry, but no luck with the registry. I was suggested by someone to use a GUID as a value to the registry rather than calculating the value. What do you think?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Any update, LawCentral?
I'm torn on what to suggest.  I think both upul007 and I provided good suggestions and useful information, but were unable to resolve the issue.  I'm okay with a PAQ no refund or a points split between upul007 and myself.