Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Read subject line of Lotus Notes email with VBA?

Status
Not open for further replies.

LJA520

Programmer
Nov 3, 2003
65
0
0
US
Hello.

I'm trying to find out how to read the subject line of a Lotus Notes email through VBA.

I'm able to get to the point of view docs in a folder, but I'm trying get the subject line of the email.

Does anyone have sample code to loop through a folder and read the subject lines of each email??

Thanks in advance!!
LJA
 
Something like the following should message out all the subject lines of the documents in your IN box

Dim s As New NotesSession
Dim db As NotesDatabase
Dim v As NotesView
Dim vn As NotesViewNavigator
Dim e As NotesViewEntry
Dim doc As NotesDocument
Dim rtitem As Variant
Dim nit As NotesItem

Call s.Initialize("your_password_here")
Set db = s.GetDatabase("your_server_here", "your_nsf_file_here")
Set v = db.GetView("($Inbox)")
Set vn = v.CreateViewNav()


Set e = vn.GetFirstDocument()


' for each document in my inbox
Do While Not (e Is Nothing)

Set doc = e.Document
Set nit = doc.GetFirstItem("subject")
msgbox(nit.values(0))
Set e = vn.GetNextDocument(e)

loop




Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top