Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum


  

PreviousPrevious NextNext

RE: Agent set on "After mail arrives" never triggers
~Vera Minatexettu 25.Jul.03 07:36 PM a Web browser
Applications Development All Releases Windows 2000


Many thanks to your help. I got the "After new mails arrive" working . The "Before" is not working but that is good enough for now . Here is my code for the "After" :
*********************************
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim doc1 As NotesDocument 'incoming mail
Dim reply As NotesDocument
'Dim searchStr As String
'Dim searchDate As New NotesDateTime("07/05/56")
Dim dc As NotesDocumentCollection
'Dim vc As NotesViewEntryCollection
Dim view As NotesView
Dim entry As NotesViewEntry
Dim nav As NotesViewNavigator
Set db = session.CurrentDatabase
Set dc = db.UnprocessedDocuments
'Search for mail with word PMMA in the subject
Dim Subject As String, SearchforString As String
Dim positionOfChar As Long
Dim positionOfCharCase As Long
Dim found As Variant

If dc.Count >0 Then
For i = 1 To dc.Count
Set doc1 = dc.GetNthDocument(i)
found = False
Subject =doc1.Subject(0)
SearchforString = "PMMA Request"
positionOfChar& = Instr(Subject$ , SearchforString$ )
'If found occurence of word PMMA in the subject line
If positionOfChar& <> 0 Then
Set view = db.GetView("($Drafts)") 'View that store the draft reply
Set nav = view.CreateViewNav
Set entry = nav.GetFirst
While Not(entry Is Nothing ) And Not found
Set reply = entry.Document 'Search for the draft
If reply.Subject(0) = "Getting Started with PMMA" Then
reply.Form = "Memo"
reply.SendTo = doc1.From
reply.Send(True)
found =True
Else
Set entry = nav.GetNext(entry)
End If
Wend
End If
Next
End If
End Sub




Agent set on "After mail arrives" n... (~Vera Minatexet... 23.Jul.03)
. . RE: Agent set on "After mail arrive... (~Holly Frokigen... 23.Jul.03)
. . RE: Agent set on "After mail arrive... (~Naomi Cisrelit... 24.Jul.03)
. . . . RE: Agent set on "After mail arrive... (~Holly Frokigen... 24.Jul.03)
. . . . RE: Agent set on "After mail arrive... (~Vera Minatexet... 24.Jul.03)
. . . . . . RE: Agent set on "After mail arrive... (~Holly Frokigen... 25.Jul.03)
. . . . . . . . RE: Agent set on "After mail arrive... (~Vera Minatexet... 25.Jul.03)


Document Options






  Document options
Print this pagePrint this page

Search this forum

Forum views and search


  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Category
Platform
Release
Advanced search

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS