Posts by Heisenberg30

    Need help to extract body, subject, sendTo, From, PostedDate of emails in a folder from Lotus notes into excel. Saw below code from an old thread but only gets the body of a currently open email. Thank you in advance.

    Public Sub Lotus_Notes_Current_Email()

    Dim NSession As Object 'NotesSession

    Dim NUIWorkspace As Object 'NotesUIWorkspace

    Dim NUIDoc As Object 'NotesUIDocument

    Dim NItem As Object 'NotesItem

    Set NSession = CreateObject("Notes.NotesSession")

    Set NUIWorkspace = CreateObject("Notes.NotesUIWorkspace")

    Set NUIDoc = NUIWorkspace.CurrentDocument

    If Not NUIDoc Is Nothing Then

    With NUIDoc.Document

    Set NItem = .GetFirstItem("Body")

    If Not NItem Is Nothing Then

    MsgBox prompt:=NItem.Text, Title:=.GetItemValue("Subject")(0)

    End If

    End With


    MsgBox "Lotus Notes is not displaying an email"

    End If

    Set NUIDoc = Nothing

    Set NUIWorkspace = Nothing

    Set NSession = Nothing

    End Sub