I had a question on here some time ago about creating a agent. The agent is suppose to create a email from parsing some information from a incoming email document. Here is the code I am trying to use.
Call SendMemoFromTag(memo, "username", Chr(10))
To be honest this may work. But it has been so long since I have created a agent I am having problems with it. Can someone help me create a agent using the code.
Sub SendMemoFromTag(memo As NotesDocument, Byval tagStart As String, Byval tagEnd As String)
Dim sess As New NotesSession
Dim parts As Variant
Dim body As String, sendto As String
sess.ConvertMime = True
body = memo.GetItemValue("Body")(0)
If (Instr(1, body, tagStart, 5) = 0) Then Exit Sub
parts = Split(body, tagStart)
If (Instr(1, parts(1), tagEnd, 5) = 0) Then sendto = Trim(parts(1)) Else sendto = Trim(Strleft(parts(1), tagEnd))
Dim memo2 As NotesDocument
Set memo2 = memo.ParentDatabase.CreateDocument
memo2.Form = "memo"
memo2.Subject = "TEST"
memo2.SendTo = sendto