RE: Forms

  • From: "Kenn Garroch" <kenn@xxxxxxxxxx>
  • To: <exchangelist@xxxxxxxxxxxxx>
  • Date: Thu, 14 Feb 2002 16:43:00 -0000

Sorry if this is a repeat - a copy of my previous email came back as a complete 
tangle... Plain text this time.
----------------------------

This is not that simple (unfortunately) as you have to change the message class 
of all of the forms and while help (Contents, Advanced Customisation, Working 
with forms, Change the form used by existing items  in a folder) does provide 
an idea of the solution it will take a bit of work to adapt it to your needs.
 
<quote>
In some cases you may need to change the form associated with items that are 
already in a folder. This is often necessary after importing items, or if you 
create a custom form after you have already created items based on a standard 
Microsoft Outlook form.
The Message Class field cannot be directly changed using the Outlook user 
interface, but you can use VBScript, Visual Basic, or Visual Basic for 
Applications to change the Message Class field.
The following Automation code can be used as a basis for developing your own 
solution. This code assumes that the name of the new form is MyForm. It will 
change all contacts in your default contacts folder so that they will use 
MyForm.
Sub ChangeMessageClass()
Set olApp = New Outlook.Application
Set olNS = olApp.GetNameSpace("MAPI")
Set ContactsFolder = _
    olNS.GetDefaultFolder(olFolderContacts)
Set ContactItems = ContactsFolder.Items
For Each Itm in ContactItems
   If Itm.MessageClass <> "IPM.Contact.MyForm" Then
      Itm.MessageClass = "IPM.Contact.MyForm"
      Itm.Save
   End If
Next
End Sub
</quote>
Someone somewhere must have used this code to generate a macro that will do a 
'general' job...If not, and I can find the time, it shouldn't be too hard - and 
would be pretty useful.
HTH
Kenn
 
 -----Original Message-----From: Juan Ibarra [mailto:jibarra@xxxxxxxxxxx]Sent: 
14 February 2002 16:08To: [ExchangeList]Subject: [exchangelist] Forms
http://www.MSExchange.org/


I have an outlook form that is associated with a mailbox.  I want to replace 
this form with a different one.  Any ideas of where to do this?  I don't seem 
to find it anywhere.
 
thanks in advance
 
 
 
Juan Ibarra
juan@xxxxxxxxxxx

------------------------------------------------------
You are currently subscribed to this MSExchange.org Discussion List as: 
kenn3@xxxxxxxxxx
To unsubscribe send a blank email to leave-exchangelist-668885C@xxxxxxxxxxxxx 

Other related posts: