Converting existing contacts to custom contact form

 

index.htm
gallery
blog
message board
home
casino
 

The reason I am posting this here is apparently nobody has figured it out. Either that or I never ran across anyone who figured it out (and believe me, I tried). What I did find when searching for how to do this was miles and miles of pages with convoluted methods involving all kinds of third part utilities, custom code, etc...

It is NOT that hard.

This document shows you how to easily convert existing contacts into the format used by the new custom form you have created.

Assumptions:

1. You are using Office 2003 (but I don't see why it wouldn't work for any Macro-supporting version of Outlook)
2. You have created a custom form for dealing with your contacts.
3. You have a bunch of contacts, and want them to show up in the ofrmat of the new form.

Prerequisites:

1. Know the MESSAGE CLASS of your form. The message class for the outlook default contact form is IPM.Contact. Generally, when you create and publish a new form, you name it something like "New". This results in a message class called IPM.Contact.New. It is this new message class which you need. The easiest way to obtain this is go to PUBLISH AS in the forms menu, and look at the bottom of the dialog box. As you give the form a name, the message class will change accordingly. Pay attention to case.

2. You should have published the form into the PST\folder that contains the objects you wish to create. I don't know if this is absolutely mandatory, but it worked for me.

Procedure:

1) In Outlook, open the FOLDER LIST so you can see all your PST's, and subfolders.

2) Navigate to the folder that contains the contact objects you want to covert.

3) Go to TOOLS --> MACROS on the menu bar.

4) In the macro editor give the new macro a name (what you call it is not important) and press CREATE

5) Paste the following code into the macro editor.

Sub Item_Open()
' Change the following line to your new Message Class
NewMC = "IPM.Contact.MyNewForm"
Set CurFolder = Application.ActiveExplorer.CurrentFolder
Set AllItems = CurFolder.Items
NumItems = CurFolder.Items.Count
' Loop through all of the items in the folder
For I = 1 To NumItems
Set CurItem = AllItems.Item(I)
' Test to see if the Message Class needs to be changed
If CurItem.MessageClass <> NewMC Then
' Change the Message Class
CurItem.MessageClass = NewMC
' Save the changed item
CurItem.Save
End If
Next
MsgBox "Done."
End Sub

6) Close the macro editor.

7) Go into Outlook. Make SURE you are currently in the folder that contains the objects you want to convert.

8) From the menu bar click TOOLS --> MACROS

9) Select the macro you just created and press RUN.

10) If everything is cool, you will get a neat message that says "done". Close the message and you should be all set.

Yes, it is that simple. If it went wrong for you, double check the name of your message class in the custom form.

PS: If you are here you probably already know how to make NEW contacts use the form, but just in case, go to the folder list again, right click the contact folder you wish to always use the new form and choose PROPERTIES. In the GENERAL tab there is a box that is labeled "When posting to this folder use". Drop the selector down and choose your form.

No, I accept no responsibility for you or this procedure for messing anything up. This is my private message to myself, and you found it by accident. My standard warning applies - never attempt this, use only test data, have a good backup, use an etch-a-sketch instead of a laptop.