Hi,I get in my log file the type mismatch error. I dont know how to run the debugger and i dont know what is holding up this code… Please please help me! thanks!
Sub Initialize
Dim session As New NotesSession
Dim doc As notesdocument
Dim mdoc As NotesDocument
Dim db As notesdatabase
Dim tmporg As Variant
Set doc=session.DocumentContext
Set db = session.currentdatabase
Set mdoc = New NotesDocument( db )
Let tmporg = doc.Organization
If (tmporg= "Kenanga Recovery") Then
mdoc.Form = "Memo"
mdoc.SendTo = "anastasia.vassili@capmsl.com"
mdoc.subject = "Web Call logged Test 13/5 test mail agent"
mdoc.body = "Please note, call number the email agent is working via the internet. "
Call mdoc.Send(False)
End If
End Sub
Subject: Agent error : Type mismatch
Hi,
Probably you can try this code.
Sub Initialize
On Error Goto ErrHandler
Dim session As New NotesSession
Dim doc As notesdocument
Dim mdoc As NotesDocument
Dim db As notesdatabase
//Dim tmporg As Variant
Dim tmporg as String
Set doc=session.DocumentContext
Set db = session.currentdatabase
Set mdoc = New NotesDocument( db )
//Let tmporg = doc.Organization
tmporg = doc.Organization( 0 )
If (tmporg= “Kenanga Recovery”) Then
mdoc.Form = “Memo”
mdoc.SendTo = “anastasia.vassili@capmsl.com”
mdoc.subject = “Web Call logged Test 13/5 test mail agent”
mdoc.body = "Please note, call number the email agent is working via the internet. Call mdoc.Send(False)
End If
Exit Sub
ErrHandler:
Print Error$ + " in line no. " + Cstr(ERL)
Exit Sub
End Sub
Hope this works.
Another piece of advice is to use the Error handler.
This will tell you exactly where the error is in your code.
Regards,
Nitin
Subject: How to run the debugger
Hi,you can start/stop the debugger with
File → Tools → Debug LotusScript