The MakeResponseMessage subroutine, called only from the Folder_OnMessageCreated event, retrieves the field values associated with the posted critique, using the GetEventDetails and GetPropertiesFromLitCrit subroutines as supporting functions. MakeResponseMessage does this to determine whether the newly posted critique is a new submission by the reviewer or has arrived in the folder after being sent from the approver.
If it is a new critique that was submitted by a reviewer, and the ApprovalRequired value is 1, MakeResponseMessage calls CopyToApprover to create an IPM.Post.ToApprover message, which is then sent by the SendApproverForm subroutine to the administrator. After that, MakeResponseMessage deletes the original message from the public folder by calling the Delete method on the CDO Message object:
msgTarget.Delete
Previously, Folder_OnMessageCreated called the GetEventDetails subroutine, in which the global msgTarget variable was set to a CDO Message object representing the message (the critique) whose posting to the public folder triggered the event. This occurs in the following lines of code, which are from the GetEventDetails subroutine:
idTargetMessage = EventDetails.MessageID
Set msgTarget = CDOSession.GetMessage( idTargetMessage, Null )