We use HTML signatures which are based off a template which gets changed from time to time.

At the moment i have to open all the html files stored on the server into dreamweaver or similar, make the change to a users .htm file then to a find and replace accross the other files, which seems a dirty way of doing it.

What id like to do is use php or some form of script to pull user details from active directory then insert into a template a bit like a winword mailmerge so that when i make a change i can rebuild everyones signatures from scratch using the original template i just edited.

Hope that makes sense. Is this possible with php or would some kind of vbscript be able to achieve the same thing. Not sure where to start, if anyone can give me some pointers that would be great,

I know there are packages out there to manage things like this but the company wouldnt justify the expense.

Any help would be great, thanks

2 Answers 2


This is probably a good starting point:


or this one saves in different formats: http://gallery.technet.microsoft.com/ScriptCenter/en-us/2ab97854-cf06-4639-8556-16dcda10d851

  • thanks, that should get me going, would have liked to have avoided word all together as it fills the .htm files with extra rubbish. Would it theoretically be possible to do the same typetext kind of stuff but but in notepad, and then just stuff in the actual HTML/CSS code?
    – Ben Gillam
    Sep 25, 2009 at 7:53
  • This might be better: experts-exchange.com/Programming/Languages/Visual_Basic/… Scroll to the bottom of the page and use the reply from 'sirbounty'
    – fenster
    Sep 25, 2009 at 16:48

The open source project GenerateSignatureFromLDAP was written with exactly this in mind: generating Outlook signatures based on a template and values taken from Active Directory. See: https://sourceforge.net/projects/gensignfromldap/

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .