Question : How to get all lotus notes message in vb.net where subjects contain "ABC"?

How to get messages in inbox based on subject instead of all messages in inbox?

Further more, how to get messaged within one day and with subject containing "ABC" string?

Thanks!
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
Public Function checkEmail() As String
 
        Dim returnNoteID As String = Nothing
        open()
 
        Dim subj() As String
        Dim cats() As String
 
        Dim nDateTime As NotesDateTime = domS.CreateDateTime("")
        nDateTime.SetNow()
        nDateTime.AdjustMinute(DETECT_EMAIL_WITHIN_MIN)
 
        Dim dc As NotesView = domDB.GetView("($InBox)")
 
 
        domDoc = dc.GetFirstDocument
        Dim ni As NotesItem
        Dim nis() As NotesItem
 
        Dim current_subject As String
        Dim current_starttime As String
        Dim current_endtime As String
 
        Dim domDocDel As NotesDocument
 
 
        While Not (domDoc Is Nothing)
 
            domDocDel = Nothing
 
            current_subject = CStr(domDoc.GetItemValue("Subject")(0))
            current_starttime = current_subject.Replace(sSubjectDetectfilter, "").Trim
 
            If current_subject.IndexOf(sSubjectDetectfilter) > -1 Then
 
                'If Now.Subtract(DateTime.Parse(domDoc.GetItemValue("PostedDate")(0))).TotalMinutes < DETECT_EMAIL_WITHIN_MIN Then
 
                'Dim strs() As String = doc.ColumnValues()
                llog1.write(current_starttime)
                llog1.write(" ~ ")
                llog1.write(CDate(domDoc.GetItemValue("DeliveredDate")(0)).ToString("yyyy-MM-dd HH:mm:ss"))
                llog1.write(" ")
                llog1.write("Result: Successful" + " " +  CStr(domDoc.GetItemValue("Subject")(0)) )
                llog1.writeline("")
 
            End If
 
 
            domDoc = dc.GetNextDocument(domDoc)
            If domDocDel Is Nothing = False Then
                domDocDel.RemoveFromFolder("($InBox)")
 
            End If
 
        End While
 
 
        domDoc = Nothing
        domVE = Nothing
        domVN = Nothing
        domV = Nothing
 
        close()
        Return returnNoteID
 
    End Function

Answer : How to get all lotus notes message in vb.net where subjects contain "ABC"?

Thanks~ how about searching only in subject?
Random Solutions  
 
programming4us programming4us