Change Message Class for Individual Contacts

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I attempted to change the message class for all of the items at once in order
to convert existing items to new custom form but was unsuccessful. At this
point, I would just like to be able to change each individual message class.
How do I do this? Any help is appreciated!

(Microsoft Outlook 2003)
 
Run code to change the value of the MessageClass property for each selected item.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Thank you Sue and Peter, I will see if I can figure something out. I'll let
you know!

Peter Marchert said:
I only know the way by code or a tool like "EditContacts"

http://www.marchert.de/software.html#ec

Peter

--
Peter Marchert
[EDP-Service Marchert]
Homepage: http://www.marchert.de
Programming for Excel and Outlook


I attempted to change the message class for all of the items at once in order
to convert existing items to new custom form but was unsuccessful. At this
point, I would just like to be able to change each individual message class.
How do I do this? Any help is appreciated!

(Microsoft Outlook 2003)
 
I tried looking into writing code to change the Message Class property for
each item, but have been unsuccessful. Could you tell me how to start this
code to apply to each item? I apprectiate your help.

Bridget said:
Thank you Sue and Peter, I will see if I can figure something out. I'll let
you know!

Peter Marchert said:
I only know the way by code or a tool like "EditContacts"

http://www.marchert.de/software.html#ec

Peter

--
Peter Marchert
[EDP-Service Marchert]
Homepage: http://www.marchert.de
Programming for Excel and Outlook


I attempted to change the message class for all of the items at once in order
to convert existing items to new custom form but was unsuccessful. At this
point, I would just like to be able to change each individual message class.
How do I do this? Any help is appreciated!

(Microsoft Outlook 2003)
 
Please show the code you already have.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Here is the code I currently have. Do I need to enter the code and publish
the form prior to bringing the existing items into the folder? Or do I need
to bring the existing contacts into the folder first and then publish the
form with the code?
Sub Item_Open
NewMC = "IPM.Contact.Group Holding"
Set CurFolder = Application.ActiveExplorer.CurrentFolder
Set AllItems = CurFolder.Items
NumItems = CurFolder.Items.Count
For I = 1 to NumItems
Set CurItem = AllItems.Item(I)
If CurItem.MessageClass <> NewMC Then
CurItem.MessageClass = NewMC
CurItem.Save
End If
Next
End Sub
 
When publishing the code for the Message Class for the new custom form, there
seems to be something else that also took place: My emails just in my Inbox
are now converted to Contact Form. (The emails open up with the message in
the Notes section of a default Contact form.)

The message class for my inbox is IPM.Post Is this the correct message
class for the Inbox? I would like to get it changed back. Strange that it
changed, I hadn't done anything to change it. ??
 
No doubt that happened because the Inbox was the active folder when you ran the code, which uses this statement to determine what folder to act on:

Set CurFolder = Application.ActiveExplorer.CurrentFolder

To make the messages look like messages again, run the code to change the MessageClass but this time change it to IPM.Note.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
I would suggest that you run this code as a VBA macro rather than as part of a published Outlook form.

Also note that you must display the folder that you want to process before you run this code.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Thanks Sue. I'll try running the code to change the message class back for
my Inbox. Question for you: How do I run the change message class code for
the custom contact form as a VBA Macro?
 
Back
Top