Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Automatically generate specific user signature in Outlook

Posted on 2003-02-27
Medium Priority
Last Modified: 2008-02-01

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.
Question by:BreadFan
LVL 20

Expert Comment

by:Dufo G. Belski
ID: 8034280
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.

Author Comment

ID: 8034335
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.

Expert Comment

ID: 8034387
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.
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 8034444
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.

Expert Comment

ID: 8034499
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.

Author Comment

ID: 8040095
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...

Expert Comment

ID: 8042239
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.  

Author Comment

ID: 8159123
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.

Accepted Solution

Computer101 earned 0 total points
ID: 10491079
PAQed, with points refunded (200)

E-E Admin

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Are you looking for the options available for exporting EDB files to PST? You may be confused as they are different in different Exchange versions. Here, I will discuss some options available.
As a Microsoft Exchange user, you must have known the importance of an Offline storage table (OST) file. It is nothing new for an Outlook user to be dependent on a .ost file during a server break down or a problematic Internet connection. In such a…
CodeTwo Sync for iCloud (http://www.codetwo.com/sync-for-icloud?sts=6554) automatically synchronizes your Outlook 2016, 2013, 2010 or 2007 folders with iCloud folders available via iCloud Control Panel. This lets you automatically sync them with…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question