Search for particular new mail from particular email ID in inbox of lotus notes and paste it into excel sheet.

  • Hi,


    I am working on following code to read the new email from a particular mail id (ie. [email protected]) or search for particular mail in which its subject contains the text as "New Instruction" if arrived with current date and time of system then the body of the mail will be pasted in excel sheet and send it automatically. Anyhow, I am unable to do so, please help me on the following code to work.


    I have used the following code on sheet to run the below two macros automatically


    Code
    1. Private Sub Workbook_BeforeClose(Cancel As Boolean)
    2. Application.OnTime dTime, "Lotus_Notes_Current_Email2", "Send_Lotus_Email2", False
    3. End Sub
    4. Private Sub Workbook_Open()
    5. Application.OnTime Now + TimeValue("00:00:01"), "Lotus_Notes_Current_Email2", "Send_Lotus_Email2"
    6. End Sub

    And code to search particular e-mail from the inbox and paste it into the excel.


    And code to send the email.