kerzner
asked on
Lotus Domino - find "from" for email
Hi,
I have this code going through the email doc in domino
For Each it In docMailItem.Items
Debug.Print it.Name
Debug.Print it
' or get the value in any other way!
Next it
I see the it.Name as being all the fields that I need, such as Subject and From, but I can not get to the value. Please help. Thank you.
As a background, here the code leading to it. It all works.
Set colMailItems = Maildb.AllDocuments
Set docMailItem = colMailItems.GetLastDocume nt
NumberOfMessages = colMailItems.Count
ReDim aryContent(NumberOfMessage s)
blnReadMailRunning = True
For lngItem = 0 To NumberOfMessages - 1
Open storePath + "/email_" + CStr(lngItem + 1) + ".txt" For Output As 1
Open storePath + "/email_" + CStr(lngItem + 1) + ".prop" For Output As 2
itmMailItem.Authors = Join(docMailItem.Authors)
Print #2, "Name=From"
Print #2, "Value=" + itmMailItem.Authors
If TypeName(docMailItem.Body) = "String" Then
itmMailItem.BodyText = docMailItem.Body
Else
itmMailItem.BodyText = Join(docMailItem.Body)
End If
Print #1, itmMailItem.BodyText
itmMailItem.LastModified = docMailItem.LastModified
itmMailItem.Size = docMailItem.Size
I have this code going through the email doc in domino
For Each it In docMailItem.Items
Debug.Print it.Name
Debug.Print it
' or get the value in any other way!
Next it
I see the it.Name as being all the fields that I need, such as Subject and From, but I can not get to the value. Please help. Thank you.
As a background, here the code leading to it. It all works.
Set colMailItems = Maildb.AllDocuments
Set docMailItem = colMailItems.GetLastDocume
NumberOfMessages = colMailItems.Count
ReDim aryContent(NumberOfMessage
blnReadMailRunning = True
For lngItem = 0 To NumberOfMessages - 1
Open storePath + "/email_" + CStr(lngItem + 1) + ".txt" For Output As 1
Open storePath + "/email_" + CStr(lngItem + 1) + ".prop" For Output As 2
itmMailItem.Authors = Join(docMailItem.Authors)
Print #2, "Name=From"
Print #2, "Value=" + itmMailItem.Authors
If TypeName(docMailItem.Body)
itmMailItem.BodyText = docMailItem.Body
Else
itmMailItem.BodyText = Join(docMailItem.Body)
End If
Print #1, itmMailItem.BodyText
itmMailItem.LastModified = docMailItem.LastModified
itmMailItem.Size = docMailItem.Size
msgbox docMailItem.columnvalues(1 )
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Sorry, Richie, you ARE the expert, I know, but I get
Object doesn't support this property or method
Object doesn't support this property or method
ASKER
Hooray! Debug.Print it.text worked
Then, the problem is with docMailItem, it is not a NOTESDocument object, isn't it?
If you have an object reference for each document in AllDocuments view, then, one of its properties is .columnvalues which is an array.
ASKER
no, of course not. I know that this is an old library I am using, but I have the code, and it is already working, so be it for now
when I re-write, I will probably use Java anyway
Best regards.
when I re-write, I will probably use Java anyway
Best regards.