Automatically generate specific user signature in Outlook


I'm trying to automate the use of signatures in outlook 2000 for our company. Each user in our network has a .txt file on his local disk containing his name, function, email, phone number etc.

What we would like to have is a macro that runs when the user creates a new e-mail, then the macro should get this information, and copies it into a signature. Is that possible?

I did some similar in Word. We use a couple of templates which get information from that file. This process also works by a macro.

The signature should finally look like this:

Yours sincerely,
<company name>

<firstname> <lastname>
Direct no.     :     <phone no.>
Fax no.             :     <fax no.>

Can anyone help me? Any help would be appreciated.

By the way, using Word as email-editor is not an option.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dufo G. BelskiRetired bureaucrat/desktop supportCommented:
I'm confused.  Can't you just use the built-in signature function in Outlook 2000?  That is, click on Tools, Options, then the Mail Format tab.  At the bottom of the page is a signature section.  Create a signature (you can copy and paste your txt file), then designate it as the default, and it will appear automatically on each new message.
BreadFanAuthor Commented:
I know that option, but then we have to manually create hundreds of signatures. Which is a lot of work.

If we can spread a macro through our company which does the job for us, we would be very happy.
Outlook stores it's signatures several ways:

<profile name>.htm is the html auto signature
<profile name>.rtf is the Rich Text Format auto signature
<profile name>.txt is the Plain Text format auto signature

If each user in the network already has a txt file, perhaps copying that to the appropriate directory and renaming it to <profile name>.txt would be an acceptable solution.

To find where these are stored, create a signature on your machine and then search for the file name above. That would give you the correct path.

good luck, and let us know how you get on.
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

BreadFanAuthor Commented:
Thanks for your help. It's a reasonable option, but there's a little problem with that one.

When you create a .txt file as signature, there is no format used. It's company style to use the Arial-font, size 11.

And, i forgot to mention, there is a disclaimer underneath the emailaddress, which is in a smaller font-size.
You will need to use the signature format that coincides with the format of your outlook messages. if you go to tools, options, Mail Format, what format are you sending in? That's the format that you will need to use.  If you need the formatting you mentioned, then you most likely use RTF or HTML.

You can create a macro in word that opens the txt document you already have, format it how you want, and then save it with the name you want in the appropriate directory.

The user's outlook will automatically pick up that file.
BreadFanAuthor Commented:
We use RTF format for our email.

Letting the macro format the signature into the correct format is a pretty good idea. But how does that work, i'm just a newbie to VBA...
You don't need to do the macro in VBA, you can do it in word. Open the rtf document in word, turn on macro recording and have it record you as you format the signature. Turn off recording when done and test it out.  Then once the macro is created, you can edit it in VBA if you want or just create a new one, doing things a little differently if you didn't originally get the results you wanted.

so for example, open the rtf, turn on recording, edit, select all (to select everything), format font, Arial 11 (your company default), Ctrl-end to get to the end of the document, enter once or twice then change the font to the smaller font size and type in the disclaimer. Then save as in the appropriate location, still as an rtf. Turn off recording.  

test it on a few different signature files and see if you get the results you want.  
BreadFanAuthor Commented:
Yeah, I just solved the problem.

I created a .txt file with the rtf code of the signatures in it. Then i used php to read this txt file and put it in a string. Then the php page searches for the fields, and replaces the fieldnames (like firstname/lastname etc.) with the real firstname/lastname/whatever.

Then the string is saved as an .rtf file, and it is copied to the client via a batch-file.

The batch file also imports some registry changes.
PAQed, with points refunded (200)

E-E Admin

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.