I would like to select the Contacts folder, not the active folder. This must be simple! How?
This script sets the form or "message class" that contacts use. But, if I have inbox selected when I run it, all items in that folder will open in a contact form. Ouch, can't do that.
Thanks in Advance (TIA)
Sub cmdSetForm_Click()
' Change the following line to your new Message Class
NewMC = "IPM.Contact.CustomForm"
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 "All Contacts using new Form."
End Sub
This script sets the form or "message class" that contacts use. But, if I have inbox selected when I run it, all items in that folder will open in a contact form. Ouch, can't do that.
Thanks in Advance (TIA)
Sub cmdSetForm_Click()
' Change the following line to your new Message Class
NewMC = "IPM.Contact.CustomForm"
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 "All Contacts using new Form."
End Sub