Introduction

The steps to create mail signature in Outlook manually are not so complex to perform. But as it usually happens, this ‘rule’ cannot be applied to all cases. Once you can burden this task on user’s shoulders in a small company with a few computers in net and probably no Active Directory, go do it in large company. Even in relatively large company it’s nearly impossible to force users to go beyond corporate rules on formatting the signature. At any time in any place chances are very high we will get the chaos within the settings of users’ signatures. Ones just will be unable to create them at all, others will leave your direction and not set signature at all, while the rest will edit the standardized formatting to what they like to look like and… You will get the chaos. Imagine you will start labeling your corporate logo differently each time you put it somewhere. John will put it that like, Marianne will add some flowers at the very left conner of the logo because she is delighted with the Spring that came earlier (later?) this year. Absurd? For sure. Logo is that kind of things that usually changes only by common agreement and cannot change and depend on the each single person wish. Surely, you can create legal notices, you can stick banners screaming on users and forcing them to comply the rules. But the question is: should you do that? Or to say it better: should THEY do it? At least they were employed to do what they are specializing in and what they can do best, so why bothering them with excess problems and drawing them away from their internal responsibilities. While there are things that people should be able to freely made themselves, there are things at the same time that must be standardized. Just for the sake of following corporate rules, for the sake of what any standards are created for.

First Steps to Automate Creation of Outlook Signature

Here I will go through the process describing the process of how to create e-mail signature for Outlook using automation in the step-by-step manner.

The first thing you start thinking about automation is probably scripting. And because we want to add text here, we need to use Microsoft Office Word. Moreover, Outlook object model as it seemingly seems does not include methods that would allow to create and assign signatures for e-mail messages.

Semi-Automatic Approach

First of all we need to open our application. Because we will use Word here, we need to start Word application.

Set objWord = CreateObject(“Word.Application”)

We are creating objWord object to do that. If we want our application to be visible as we start it allowing the user to see the main application window, we need to set object property accordingly. Thus we can set Visible property of objWord instance to true.

‘objWord.Visible = True

Uncomment the string in the script and you’ll see the window displayed without any document opened in it. Comment it back on and you’ll see only the process instance displayed within the list of your task manager. But aren’t we here to create the signature? To create it we need to create a document that we will fill in further with signature info. To create a new document we need to use Add method and create a objDoc object which will designate the document we are creating:

Set objDoc = objWord.Documents.Add()

Alright. We created the document. Let’s start righting the text. We need some method that will do the job for us. Something like TypeText would be able to do that job for us. But the objWord object doesn’t have such a method contained within its object model. What should we do? Right what we do when we start typing out document. We should put an insertion point within it. What cannot be done with one object can be done with another one. The first thing that Scripting Guys are suggesting to use to type e-mail signature in live is to create Word’s Selection object. Here’s how we do that:

Set objSelection = objWord.Selection

Now we can start writing our first string of text to build the signature. We need to invoke the mentioned TypeText method here:

objDoc.TypeText “FirstName LastName”

Where the FirstName and the LastName strings are placeholders for the text that will be typed in the document. Thus if you will put John Doe here, and run the TypeText method you will see the John Doe string written in the first row of the Microsoft Word document. Now then we usually type the company name under the personal name. Okay, let’s write the name of the company. Let it be the mysterious ACME Corporation:

objDoc.TypeText “FirstName LastName”

But wait, why we got out strings sticked one to each other? That’s because we forgot to do out second action we do when we type the documents, breaking the line and inserting line feed and caret return to it. That is we need to put here our well-known “Press ENTER to continue”. What’s Enter in Word? It is paragraph. Strictly speaking paragraph is more complex thing in Word because it holds style and formatting info, but let cut its capabilities to such a limited scope. To put the paragraph we should add this

objSelection.TypeParagraph()

line to the code.

You can find the whole article here
Extra info on scripts utilizing XML and HTA can be found here
Script Automation: Automatic Genereation of E-mail Signatures on User Side Without User Intervention
How to find and use Office object model documentation
Programming the Outlook object model

Technorati tags:

Sending messages without a signature is not what one would call etiquette correct. Surely when we are mailing to each other in a limited set of participants where everyone knows another person quite well, having a signature can be an excess. But once we are talking about business communications having a proper signature becomes a must.
That’s when we get why we need Word to be a default editor for composing Outlook messages.
How do we setup a signature
For personal needs we do the following
In this example Office Outlook 2003 and Office Word 2003 are covered
1. Launch Outlook and choose Tools|Options to open the Options dialog box
2. In the Options dialog box switch to the Mail Format tab
3. In the Message format select HTML from the Compose in this message format drop-down list
4. Check the Use Microsoft Office Word 2003 to edit e-mail messages
5. Under Signature select account to be which you want the signature be assigned to
6. Click Signatures button and click New button to create the signature.
7. Enter a name to set how you wish signature to be listed in the list of signatures. This is needed to differentiate between signature is you have several signature. I recommend naming convention to be FirstName LastName [Type][Lang] where the stands for the signature type and is used to differentiate between corporate and personal signature. Lang designates the language of the signature what is useful if you work with multilingual customers. So name it to be named as John Doe [Corp][EN], John Doe [Corp][DE], etc
8. If it’s your brand new signature and you have no previously created signatures there, select Start with a blank signature and click Next
9. While in the Signature text box click Advanced Edit to launch Microsoft Office Word
10. When Word will start, type your signature, format it accordingly to confirm personal preferences or corporate rules
11. Save changes to the edited document

There is a nice demo on how to create, apply formatting to bring some elegance to it, and manage profiles by switching between signatures if you have say your corporate and personal signatures.
Inserting signature in a message
Signature Management with Outlook Profiles in Domain environment
Sign off simply in Microsoft Office Word

Technorati:

The first way we used to apply profile configurations was exchange newprof.exe utility. But the keyword there was contained within the utility name – “new”. It could only create new profiles and cannot modify existing configurations.
Then at last we got modprof.exe and the ability to preserve existing settings and configure new.
The command line we use was
modprof -p \\circinus\dat\cfg$\xyzoutlook.prf
where
p PRF, specifies the path to the profile settings file. As usual, if no path is specified utility looks for the default.prf file located within %systemroot% folder

s, this switch specifies an option to run the tool in a separate window, ask user to specify the PRF file and display messages within it

x, when the –s option is specified, sets automatic start without waiting for user to select concrete PRF file.

z, specifies MAPI error code output if any

Additional source of trouble in case when you deploy it for several users and on a limited set of persons you get an error is the fact that the tool cannot generate log files.

List of switches for the newprof automatic profile generator program
Creating Default User Profiles

When I was talking about the trick to update the in-use file with new version the last step to say good-bye to the current session and start working with the updated version was to reboot the PC. Quite reasonable one would ask if it’s possible to automate this process too? Yes, we can reboot the PC automatically using shutdown utility that come with Windows distribution and is locate in the %systemroot%\system32\ folder. To automate the reboot procedure we need to pass -r switch to input of the shutdown.exe tool
shutdown -r [-f]
By the way, notice the [-f] parameter I put in the command line in addition to the -r parameter. It is an additional parameter used to force computer shutdown and force closing of running tasks. Use this switch carefully as you will lose data that hasn’t been saved before running the reboot.

If you want to replace a file that is currently in use by a user or system process you can just use rename technique.
1. Open command prompt by typing %compspec% within your run dialog box
2. Change the target folder to the folder where the file is to be replaced by executing
cd “\your path\”
if you want to switch to the folder located on the same drive or
cd /d “x:\your path”
to switch to the folder located on another drive
3. Now rename the locked file that you want to replace with the new fresh version copy by typing something similar to
ren function.dll function.dll.old
Windows will allow you to rename the library but will continue to use it until you reboot
4. Copy the new dll library to this location
copy x:\updates\function.dll .\
5. Reboot the PC. When you will log on to system with the new session, system will start to use your new updated version of dynamic link library.

Or you can pick this Locked Files Wizard tool

Additionally there’s useful tool to work with file handles called Unlocker
Good for one-time needs although requires external scripting to do that in multi-pass way.

To those of you wondering, what we decided to do further, I will continue the storytelling. We started implementing outlook profiles with Office Profile Wizard. We got Office 2003 Resource Kit and started with creation of standard profile description PRF-file.
The Configuring Outlook Profiles by Using a PRF File whitepaper helped us to tackle the tool up.
The main problem was the fact that after configuring you realize that the settings you’ve made were made from scratch and thus would give the return for new Outlook-less systems only. The good thing was that we just established new room with brand new PCs. The bad thing was that we had to move several users that already work on old PCs but the way to get the settings for them was to apply this newly created PRF on new machines via MST transform file. The second what was actual for us is the we have different versions of operating systems and different versions of applictions which in turn require different steps to apply PRF file.
So we started with manual edit of registry. We deleted the key
HKEY_CURRENT_USER\Software\Microsoft\Office\xx.0\Outlook\Setup\First-Run
to drop the state flag
created a string ImportPRF in
HKEY_CURRENT_USER\Software\Microsoft\Office\xx.0\Outlook\Setup
key and set is with value \\circinus\dat\cfg$\xyzoutlook.prf

to point to the PRF file we created and placed on our server share. Thus key value represents the UNC path where circinus is the name of our server, dat\cfg$\ is the share path and the xyzoutlook.prf is how we named our profile configuration file.

Technorati:

I work in a company that provides various kinds of services. We have a pretty distributed corporate network throughout the country. Many people use our mailing server to collaborate with each other. Some work in local offices, some go out for a business trip. Add here the never-ending flow of incoming clientèle and you’ll probably see yourself as it’s you are talking from this blog. Nothing that unusual. We know it’s our normal quite serene working day in IT department. No matter where we are actually working in. Routine. Returning back to what I have in my corp. As we also have external offices this adds the additional complexion. We definitely needed some way to separate client accounts at least to differentiate between customers and workers. The standard way to answer the task is to use outlook profiles. That’s what we did.
We started with quite a brute way of making this. We wrote down the guide on the corporate intranet site describing the steps the new user should take himself to setup outlook profiles. Again nothing that comes extremely unusual, just the standard multi-step follow-up to guide user through the manual configuration. Except that the diversity of users forced us to enhance the guide to handle several basic configurations of used version of Outlook and the operating system it runs on.
Here I will go a little bit aside to talk about intentions and decisions. (Sometimes they differ, huh?) First I wasn’t thinking about showing you that ‘guide’ we created. I just didn’t want to attack you with additional strings of ASCII bytes to narrow the excess and cancel the empty non-informative noise. But then I come thinking of why not to show you our errors and describe the underlying story a bit more detailed to get it more descriptive and explanatory. This would bring some humor and joy and allow some of you to not repeat my errors. Sometimes it gets the positive result if someone learns from the errors of your own. So I decided to include that our user manual and put some extra info to show how we found the the way to resolve the problem settled down the internal and external collaboration to run in a fully automated way. Here it is in all its glance though in a slightly abridged form (I cut down the specific info).

How to set up Outlook profiles to work with your mail in the XYZ corporation network

Operating System: Windows 98
Outlook client: Microsoft Outlook 2000

1. Click Start
2. Select Settings\Control Panel to open the Control Panel window
3. Locate the Mail or Mail and Fax icon and double-click on it to launch the applet
4. In the Mail dialog box opened Add button to start the Inbox Setup Wizard
5. In the wizard page opened select the Use the following information services radio button and check the Microsoft Exchange Server check box in the scrolling field below
6. Click next to move to next wizard dialog box
7. Click into Microsoft Exchange server field and type the following in it
mail.xyz.com
8. Switch to second field on the wizard dialog box and type your last name
9. Click next to move to next wizard dialog box
10. Click No when prompted to ask “Do you travel with this computer?” question
11. Click Finish to close the wizard
12. Select the created profile and click Properties button
13. On the XYZ Corporation Properties mailbox dialog box select the Microsoft Exchange Server and click Properties button
14. In the Microsoft Exchange Server dialog box opened check you’ve entered correct settings for the mail server address and the name of your mailbox we put previously in steps 7 and 8. Revise if the mail server address was typed correctly and listed as
mail.xyz.com
as you wouldn’t be able to work with mail if the address was incorrectly set
15. Click OK to close the window
16. Now double click the Outlook icon on your desktop to start mailing program.
17. In the Enter password dialog box type
18. Your login name into the User Name field
19. XYZ in the in the Domain Name field
20. Your password into the Password field
Note: if you don’t know your your login and password check with your supplementary Account setup form list or contact system administrator by phone to get them BEFORE proceeding with next step
21. When entered click OK to proceed with settings and log in to mailbox

Note: if you need to create multiprofile setup, refer to How to create multiprofile mail setup document on the http://intranet/techinfo/mail/outlook/ompmbseetup.doc

Operating System: Windows 2000, Windows XP
Outlook client: Microsoft Outlook 2002, Microsoft Office Outlook 2003

1. Click Start
2. Control Panel to open the Control Panel window
3. Locate the Mail icon and click on it to launch the applet
4. In the Mail dialog box opened Add button and enter the profile name in the New Profile dialog box
5. In the Mail Setup – Outlook dialog box click on the E-mail Accounts… button to launch the E-mail Accounts wizard
6. Select Add a new e-mail account radio button to be able to add your new Outlook account
7. Click Next to go to next wizard dialog box
8. On the Server type dialog select Microsoft Exchange Server radio button and click next
9. On the Exchange Server Settings dialog box fill in the field with the data contained in the supplementary Account setup form list or contact system administrator by phone to get the info
10. In the Microsoft Exchange Server field enter mail.xyz.com as the address to be used by Outlook to connect and retrieve your personal mail
11.1 If you are using Office Outlook 2003 check the Use Cached Exchange Mode checkbox below
11.2 If that is not true and you are using the previous version of Microsoft Outlook go to next step
12. In the User Name field enter the name to be used for your mail box. If you don’t know your username, click Start and use the name written in the caption of the Start menu
13. Click Check name to verify the entered name and avoid conflict with existing names (if any)
14.1 If you are using Windows XP, enter username@xyz.com in the User name field and fill in the password in the field below
14.2 If you are using Windows 2000, enter your username in the User name field, fill in the password in the next field and enter xyz in the Domain name field
15. If Microsoft Outlook notification message box appears notifying you about existing personal folders appears, go to step 17
16. Setup is now finished. Click Finish button the save settings and exit the Outlook configuration wizard
17. Click Yes button to confirm and continue
18. Start the Mail Setup – Outlook dialog box (see step 5 above) click on the E-mail Accounts… button to launch the E-mail Accounts wizard
19. Select View or change existing e-mail accounts radio button and click Next button
20. In the E-mail Accounts dialog select Microsoft Exchange Server entry within the Outlook processes e-mail for these accounts in the following order
21. Server will ask you to authenticate. Enter the data as discribed in steps 14.x above
22. Change delivery target in the Deliver new mail to the following location drop-down list and choose Mailbox – Username, where Username will be the name you used to authenticate and click Finish

Pretty complicated, isn’t it? I bet you agree. Imagine how complex this comes for the person who doesn’t need to know deep in IT and just wants to concentrate on his personal work responsibilities. Twenty steps to complete to just configure mail profile. That last not too long until we realized that this mess cant last any longer and we should implement something to smooth the process for users and, if possible, make it completely automatic and transparent for the user.

How to create a new e-mail profile in Outlook 2007 and in Outlook 2003
Overview of Outlook e-mail profiles

Create a new e-mail profile in Outlook
Manage Outlook profiles
Get the version number for your Office program and information about your computer
Use Outlook Anywhere to connect to your Exchange server without VPN
What is a Microsoft Exchange account?
Change the password for your .pst file

Scan and repair corrupted Outlook data files
Turn on or off Cached Exchange Mode

Technorati tags: outlook profiles exchange profiles client mail setup mailbox outlook mailbox

More blogs about outlook profiles.
Add to Technorati Favorites