Advertisement

01.16.2003 at 06:27AM PST, ID: 20459756
[x]
Attachment Details

Lotus Notes & VB - 2 Part - markedasread & folder value

Asked by Michelt in VB Database Programming

Tags: lotus, notes, vb

Currently I am writing a Lotus Notes Automation Client (Freely named here). It's purpose is to grab the body of Emails that are coming in through a certain account and parse them out.

additional info:

- App is not running on the server
- Tried the unprocesseddocuments (No beans - Server only)

Currently I am using the Delivereddate and the LastModified date to see if the  email is new.(see code) this works but when someone goes into the account and reads and email (even if they set if back markasunread) , because the last modified date changes, the client wont pick up the Email.

So the Questions are:

1. Is there a way to find out whether or not a document has been read

2. What folder a document residing in.

Any additional question ask here or Email to mmthiran@hotmail.com

(since it a 2 parter I'll set it to 200 pts.

Here is the raw code bit ....


Dim colMailItems As NotesDocumentCollection
Dim docMailItem As NotesDocument
Dim NoteMailItem As NoteItem
Dim NotesMailItem As NotesItem
Dim NotesMailItem2 As NotesItem
Dim strPartSql As String

Dim NumberOfMessages As Long

On Error GoTo errhandler

Set colMailItems = Maildb.AllDocuments
Set docMailItem = colMailItems.GetLastDocument
'Set NoteMailItem = docMailItem

NumberOfMessages = colMailItems.Count

For lngItem = 0 To NumberOfMessages - 1
   Set NotesMailItem = docMailItem.GetFirstItem("Subject")
    Set NotesMailItem = docMailItem.GetFirstItem("dateLastModified")
    If NotesMailItem.Text = "*** Danka Lost Customers ***" Then
        If DateDiff("s", docMailItem.LastAccessed, NotesMailItem2.Text) >= 0 Then 'Compare to see if Email Item is new
            Set NotesMailItem = docMailItem.GetFirstItem("Body") 'Get Body Item
           
            strPartSql = parse_email(NotesMailItem2.Text) 'Parse_email returns the Partial Sqlstring extracted from the body
            insert_in_sqldb (strPartSql) 'The partial Sql string is used to Updatet the Database
           
            DoEvents
           
            'docMailItem.AppendItemValue "Subject", "Processed *** Danka Lost Customers ***"
            'docMailItem.Save True, False, True
            docMailItem.PutInFolder "Processed" 'Move to Processed Folder
            docMailItem.RemoveFromFolder "Inbox" 'Remove document from inbox
            'docmailitem.
                        'docMailItem
        End If
     End If
     Set docMailItem = colMailItems.GetPrevDocument(docMailItem)
Next

On Error GoTo 0
Exit SubStart Free Trial
[+][-]01.17.2003 at 02:02AM PST, ID: 7747008

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.17.2003 at 06:39AM PST, ID: 7747989

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.20.2003 at 07:56AM PST, ID: 7761563

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.20.2003 at 11:52PM PST, ID: 7767897

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.21.2003 at 12:29AM PST, ID: 7768094

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.21.2003 at 05:01AM PST, ID: 7769630

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.21.2003 at 05:59AM PST, ID: 7770101

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: VB Database Programming
Tags: lotus, notes, vb
Sign Up Now!
Solution Provided By: GrahamSkan
Participating Experts: 1
Solution Grade: A
 
 
[+][-]01.21.2003 at 08:31AM PST, ID: 7771608

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32