
To change an item's message class with an Exchange Server script
Hello,
I would like to use the script to change an item's message class with
an Exchange Server script that is available on www.slipstick.com. I
believe I have gone through the steps to implement it, but it is not
yet working for me. I am hoping that someone can help me with tips
for troubleshooting. I am using Exchange Server 5.5 with SP 4 and
Outlook 2000.
Here is what I have done:
I created a public folder and made it visible in the GAL. I am the
owner of the folder. I have gone through the necessary steps so that
I can see the Agents tab when I right click the public folder in
Outlook. I have ensured that I have author rights on the EventConfig
folder using Exchange Administrator. The Microsoft Exchange Event
Service is running. I have published a custom form called
IPM.NOTE.itworks to the public folder. I right-clicked the public
folder, chose the Agents tab, created a new script called Test Script.
I checked the box "a new item is posted in this folder". Here is the
script that should run:
<SCRIPT RunAt=Server Language=VBScript>
'------------------------------------------------------------------------------
'FILE DESCRIPTION: Exchange Server Event Script
'------------------------------------------------------------------------------
Option Explicit
'------------------------------------------------------------------------------
' Global Variables
'------------------------------------------------------------------------------
'------------------------------------------------------------------------------
' Event Handlers
'------------------------------------------------------------------------------
' DESCRIPTION: This event is fired when a new message is added to the
folder
Public Sub Folder_OnMessageCreated()
Dim objSession
Dim objItem
Dim strMessageClass
strMessageClass = "IPM.Note.itworks"
Set objSession = EventDetails.Session
Set objItem = objSession.GetMessage(EventDetails.MessageID, Null)
If objItem.Type = "IPM.Note" Then
objItem.Type = strMessageClass
objItem.Update
End If
Set objSession = Nothing
Set objItem = Nothing
End Sub
' DESCRIPTION: This event is fired when a message in the folder is
changed
Public Sub Message_OnChange
End Sub
' DESCRIPTION: This event is fired when a message is deleted from the
folder
Public Sub Folder_OnMessageDeleted
End Sub
' DESCRIPTION: This event is fired when the timer on the folder
expires
Public Sub Folder_OnTimer
End Sub
</SCRIPT>
My expectation is that if I send a message with the class ipm.note to
that folder, the script will automatically convert that message to
ipm.note.itworks which is the class of my form. I send an email
message to the public folder, but when I open it there, it still has
the message class IPM.NOTE. Any ideas regarding what I am missing are
appreciated.
Thanks in advance.