I'm trying to generate an automatic email notification utility when a value in a program I use goes above a certain value. For a bit more info, I use a Process Information package called PI (from OSIsoft) for displaying trends and figures of various plant flows and temperatures. What I want to happen is when a flow/temp goes above a certain value, I get an email in Lotus Notes telling me that it has happened, almost like an error reporting function.
Attached is a piece of code which I was trying to use, but it keeps on giving me a runtime error 424. I've never heard of MAPI so I couldn't tell you anything about it! If you can help then please please do so. If you think this question would be better on the Lotus Notes section the just say so and I'll get it moved.
Private Sub Pt16187_DataUpdate()
' Script for tag: "DCU12_CPU_LOAD"
If Pt16187.GetValue(0, 0) > 66 Then
MAPISession1.Username = "Colin Welsh/Europe/MIC"
MAPIMessages1.SessionID = MAPISession1.SessionID
MAPIMessages1.RecipAddress = "email@example.com"
MAPIMessages1.RecipType = mapToList
MAPIMessages1.MsgSubject = "DCU12_CPU_LOAD Update"
MAPIMessages1.MsgNoteText = "DCU12 greater than 66%"