MS Office Forum / Outlook / Programming Forms / July 2004
Changing Default Contact Form Layout
|
|
Thread rating:  |
askolits - 07 Jul 2004 18:19 GMT I want to add a field to the 'contacts' form which I can easily do but I want it to affect all the contact's forms, not just for one particluar contact. How do I make a change and make it the default for all of the contacts?
-cross posted to Contacts-
Devise - 07 Jul 2004 20:39 GMT You have to change the old Message Class into your new one. You can do that by a script
http://support.microsoft.com/support/kb/articles/Q201/0/89.ASP
But you can also use a VBA Macro like this Sub change()
Set olap = CreateObject("Outlook.Application") Set olns = olap.GetNamespace("MAPI") Set olfo = olns.PickFolder For Each Item In olfo.Items Item.MessageClass = "IPM.Contact.MyForm" Item.Save Next Set olap = Nothing End SubCiao, Devise
askolits - 08 Jul 2004 04:04 GMT So every time I want to add a field to the contact form and want it to show up for every contact, I have to enumerate through each one and add it through code?
It seems it should be much easier than that.
I created a check box on want on all current and future contact forms. So I add the check box in design mode. No problem, but why in the world can't I save it so every time I now use that form for existing AND new contacts, it isn't already there. I can't imagine why they would give you all this ability to change the design of the form and not let you save it as the default.
>-----Original Message----- >You have to change the old Message Class into your new one. [quoted text clipped - 16 lines] > >. Paul in Oz - 08 Jul 2004 05:14 GMT For the"Future" contacts part of what you are trying to do then all you need to do is:
1. publish the form (to one of the contacts folder, personal library, org library...) You will need to give it a new name (ie: you can't use IP.Contact) say MyForm, IPM.Contact.MyForm 2. select properties of the folder (ie:contacts) 3. change the "When posting to this folder, use" field to your new form.
All of your existing items have a peice of data called MessageClass in them that tells them what form to display in. This is why you would need to cycle through them and change this data (see code in Devise's post) so they use your new form.
Once you have done this ONCE you can now change your new form - IPM.Contact.MyForm and publish over the top. Changes will reflect in all items using that form (which is now all items in your folder)
Having said that you can access your new field on the original contacts ALL FIELDS tabs (select userdefined fields) but this wont display the field as you want.
Cheers Paul
> So every time I want to add a field to the contact form > and want it to show up for every contact, I have to [quoted text clipped - 32 lines] > > > >. Hollis D. Paul - 08 Jul 2004 16:44 GMT > So every time I want to add a field to the contact form > and want it to show up for every contact, I have to > enumerate through each one and add it through code? What you have to do is make sure that you rename the new form with a unique name, ie, include the version number in the name--myformname_ver1. You then publish it and set it as the default for the folder. All new items created in that folder will use it.
Then you will use a utility that will change all the items with the old form name, in the messageclass field, to the new form name. All the old data items will now display in the new form.
Go to www.outlookcode.com and search on default, and you will find a page that tells you how to do all this.
Hollis D. Paul [MVP - Outlook] Hollis@outhousebythesound.com Using Virtual Access 4.52 build 277 (32-bit), Windows 2000 build 2600 http://search.support.microsoft.com/kb/c.asp?FR=0&SD=TECH&LN=EN-US Mukilteo, WA USA
OK, so I creat a form, save it and publish it as ContactNew.
I run FormSwap, I select "Contact (IPM.Contct)" in the first box. I enter "ContactNew (IPM.Contact)" the For Composing box and the Read box. I save the registry setting by exporting the Saved Setting. I register the .reg file, restart Outlook and nothing changes.
What did I do wrong?
Hollis D. Paul - 09 Jul 2004 04:17 GMT > I run FormSwap, I've not used FormSwap, so I am just guessing here. But what I think should happen is than when you click the button for a new contact item, you should see your new form. Do you?
Hollis D. Paul [MVP - Outlook] Hollis@outhousebythesound.com Using Virtual Access 4.52 build 277 (32-bit), Windows 2000 build 2600 http://search.support.microsoft.com/kb/c.asp?FR=0&SD=TECH&LN=EN-US Mukilteo, WA USA
"I've not used FormSwap, so I am just guessing here. But what I think should happen is than when you click the button for a new contact item, you should see your new form. Do you?"
Yes, I did. But I was always able to do that. That was easy. But, I have a few hundred contacts. I want to update the existing iones, not just new ones. That's what I can't figure out.
Hollis D. Paul - 10 Jul 2004 06:40 GMT > Yes, I did. But I was always able to do that. That was > easy. But, I have a few hundred contacts. I want to > update the existing iones, not just new ones. That's > what I can't figure out. On the page that I sent you to--which was http://www.outlookcode.com/d/newdefaultform.htm--there is the following text block:
Helen Feddema's VB Script method Open and publish the ResetMessageClass.oft file, then run the published form. Older version of same script available at Update Message Class Form.
That's the one that I have always used, and have never had a problem with it. Go there, try that!
Hollis D. Paul [MVP - Outlook] Hollis@outhousebythesound.com Using Virtual Access 4.52 build 277 (32-bit), Windows 2000 build 2600 http://search.support.microsoft.com/kb/c.asp?FR=0&SD=TECH&LN=EN-US Mukilteo, WA USA
askolits - 14 Jul 2004 03:18 GMT Using "Reset Message Class.oft"
This seemms so easy, but why won't it work. I created a new form [ContactsNew]. I was able to do the 'New Items for contacts' steps. That was easy, but the second part doesn't work for me. I'm running Outlook 2002. Is that the issue?
I Run the OFT file "Reset Message Class.oft" , select 'Contacts' from the dialog box, on the next screen I change the default folder name that is already in the text box from "Contacts with Orders" to "Contacts"
Next I change the default 'New Message Class' from "IPM.Contact.Custom to "IPM.Contact.ContactsNew"
I then press Proceed and it just sits there. Nothing happens. No error message, no nothing.
What's up?
Hollis D. Paul - 14 Jul 2004 20:21 GMT > I then press Proceed and it just sits there. Nothing > happens. No error message, no nothing. > > What's up? I think I remember, now. When you open the .oft file, it will create an item in the default folder of the same type, so it will appear/be saved as an item in that folder.
So, what you should do is open the .oft file, and immediately save it. Then go to the default contact folder and drag and drop it into the folder whose items you want to change. Run it from there.
Hollis D. Paul [MVP - Outlook] Hollis@outhousebythesound.com Using Virtual Access 4.52 build 277 (32-bit), Windows 2000 build 2600 http://search.support.microsoft.com/kb/c.asp?FR=0&SD=TECH&LN=EN-US Mukilteo, WA USA
askolits - 14 Jul 2004 20:47 GMT Thanks for helping me with this. I ended up downloading the MS document Omsgclas.doc. The macro in it seemed to do the trick.
Hollis D. Paul - 15 Jul 2004 16:45 GMT > Thanks for helping me with this. I ended up downloading > the MS document Omsgclas.doc. The macro in it seemed to > do the trick. That is the other one I have used in the past. Glad you got them changed.
Hollis D. Paul [MVP - Outlook] Hollis@outhousebythesound.com Using Virtual Access 4.52 build 277 (32-bit), Windows 2000 build 2600 http://search.support.microsoft.com/kb/c.asp?FR=0&SD=TECH&LN=EN-US Mukilteo, WA USA
|
|
|