Skip to end of metadata
Go to start of metadata

Purpose

This function returns the index in the MAPI message list of the message that caused the last trigger.  If you created an event that triggers when an E-mail is received, then you can run a script as the action to the event.  In the script, you call this function to get the index for the message that caused the trigger.  You can now examine the message to take more action.


Parameters

None


Returns

Return value: index
Type: long
Description: This is the index of the E-mail message that was last received.


Example

Sample Code
' this script will access the E-mail message that caused this event to trigger
' it will then speak the subject line of the message
sub main()

	dim index
	dim subject
	index = hs.MailTrigger
	subject = hs.MailSubject(index)
	hs.speak "You have mail! The subject is "
	hs.speak subject     

end sub


  • No labels